diff --git a/playbooks/install_mqtt_srv.yml b/playbooks/install_mqtt_srv.yml index 3ee37dd..1e19295 100644 --- a/playbooks/install_mqtt_srv.yml +++ b/playbooks/install_mqtt_srv.yml @@ -30,7 +30,7 @@ - name: Upload service script ansible.builtin.copy: src: scripts/mqtt_srv.py - dest: /share/Data/__GITLAB/mqtt_srv/mqtt_srv.pyw + dest: /share/Data/__GITLAB/mqtt_srv/ mode: '755' owner: admin when: inventory_hostname in groups['nas'] @@ -63,7 +63,9 @@ become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}" - name: Install bottle python package1 - ansible.builtin.shell: /etc/init.d/mqtt start + ansible.builtin.shell: "(/etc/init.d/mqtt start >/dev/null 2>&1 &)" + async: 10 + poll: 0 when: inventory_hostname in groups['nas'] become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"