upt playbook

This commit is contained in:
jaydee 2024-07-08 22:39:36 +02:00
parent fc853ca298
commit e0945fec05

View File

@ -27,10 +27,19 @@
when: inventory_hostname not in groups['nas']
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
- name: Upload service script
- name: Upload service script1
ansible.builtin.copy:
src: scripts/mqtt_srv.sh
dest: /etc/init.d/
mode: '755'
owner: admin
when: inventory_hostname in groups['nas']
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
- name: Upload service script2
ansible.builtin.copy:
src: scripts/mqtt_srv.py
dest: /share/Data/__GITLAB/mqtt_srv/
dest: /usr/bin/
mode: '755'
owner: admin
when: inventory_hostname in groups['nas']
@ -63,7 +72,7 @@
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
- name: Install bottle python package1
ansible.builtin.shell: "(/etc/init.d/mqtt restart >/dev/null 2>&1 &)"
ansible.builtin.shell: "(/etc/init.d/mqtt_srv.sh restart >/dev/null 2>&1 &)"
async: 10
poll: 0
when: inventory_hostname in groups['nas']