mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2025-01-23 20:39:26 +00:00
upt playbook
This commit is contained in:
parent
9ac9ff0e45
commit
12cff6ca07
@ -18,6 +18,7 @@
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||
|
||||
|
||||
|
||||
- name: Upload service script
|
||||
ansible.builtin.copy:
|
||||
src: scripts/mqtt_srv.py
|
||||
@ -27,6 +28,25 @@
|
||||
when: inventory_hostname not in groups['nas']
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||
|
||||
- name: Upload service script1
|
||||
ansible.builtin.copy:
|
||||
src: scripts/mqtt_srv.sh
|
||||
dest: /jffs/scripts/mqtt_srv/
|
||||
mode: '755'
|
||||
owner: root
|
||||
when: inventory_hostname in groups['router']
|
||||
become: false
|
||||
|
||||
|
||||
- name: Upload service script
|
||||
ansible.builtin.copy:
|
||||
src: scripts/mqtt_srv.py
|
||||
dest: /jffs/scripts/mqtt_srv/
|
||||
mode: '755'
|
||||
owner: root
|
||||
when: inventory_hostname not in groups['router']
|
||||
become: false
|
||||
|
||||
- name: Upload service script1
|
||||
ansible.builtin.copy:
|
||||
src: scripts/mqtt_srv.sh
|
||||
@ -77,7 +97,13 @@
|
||||
poll: 0
|
||||
when: inventory_hostname in groups['nas']
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||
|
||||
|
||||
- name: Restart mqtt service
|
||||
ansible.builtin.shell: "(/jffs/scripts/mqtt_srv/mqtt_srv.sh restart >/dev/null 2>&1 &)"
|
||||
async: 10
|
||||
poll: 0
|
||||
when: inventory_hostname in groups['router']
|
||||
become: false
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user