diff --git a/playbooks/sync.yaml b/playbooks/sync.yaml index d90f895..4eca5cd 100644 --- a/playbooks/sync.yaml +++ b/playbooks/sync.yaml @@ -13,6 +13,7 @@ timeout: 60 register: result ignore_errors: yes + when: inventory_hostname in groups['nas'] - name: Start mailu rhasp uri: url: "http://192.168.77.106:9000/api/stacks/130/start?endpointId=13" @@ -25,6 +26,7 @@ timeout: 60 register: result ignore_errors: yes + when: inventory_hostname in groups['nas'] - name: Stop mailu main uri: url: "http://192.168.77.106:9000/api/stacks/108/stop?endpointId=2" @@ -37,7 +39,7 @@ timeout: 60 register: result ignore_errors: yes - + when: inventory_hostname in groups['nas'] - name: Create archive ansible.builtin.shell: 'tar -czf /share/Data/dockers.tar.gz /share/docker_data/{mailu2,webhub,ha} --exclude="/ha/backups/*" --exclude="home-assistant.log*"' ignore_errors: yes @@ -53,6 +55,7 @@ timeout: 60 register: result ignore_errors: yes + when: inventory_hostname in groups['nas'] - name: Start mailu main uri: url: "http://192.168.77.106:9000/api/stacks/108/start?endpointId=2" @@ -65,7 +68,7 @@ timeout: 60 register: result ignore_errors: yes - + when: inventory_hostname in groups['nas'] - name: Stop mailu rhasp uri: url: "http://192.168.77.106:9000/api/stacks/130/stop?endpointId=13" @@ -78,5 +81,6 @@ timeout: 60 register: result ignore_errors: yes + when: inventory_hostname in groups['nas'] \ No newline at end of file