From d7e03038646ba5c157efc04ea9502d6f09f2f1e9 Mon Sep 17 00:00:00 2001 From: jaydee Date: Wed, 30 Aug 2023 10:25:18 +0200 Subject: [PATCH] upt playbook --- playbooks/sync_mailu.yaml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/playbooks/sync_mailu.yaml b/playbooks/sync_mailu.yaml index b1e14dd..a729b87 100644 --- a/playbooks/sync_mailu.yaml +++ b/playbooks/sync_mailu.yaml @@ -4,7 +4,7 @@ tasks: - name: Start mailu rasp uri: - url: "http://192.168.77.106:9000/api/stacks/130/start?endpointId=13" + url: "http://192.168.77.106:9000/api/stacks/{{ item }}/start?endpointId=13" method: POST body_format: form-urlencoded return_content: yes @@ -14,6 +14,10 @@ timeout: 60 ignore_errors: yes when: inventory_hostname in groups['nas'] + loop: + - 130 + - 149 + - 140 - name: Get ruleset command: nvram get vts_rulelist @@ -91,7 +95,7 @@ - name: Stop mailu rhasp uri: - url: "http://192.168.77.106:9000/api/stacks/130/stop?endpointId=13" + url: "http://192.168.77.106:9000/api/stacks/{{ item }}/stop?endpointId=13" method: POST body_format: form-urlencoded return_content: yes @@ -101,7 +105,11 @@ timeout: 60 register: result when: inventory_hostname in groups['nas'] - + loop: + - 130 + - 149 + - 140 + - name: Copy archive ansible.builtin.shell: 'scp /share/Data/dockers-{{ ansible_date_time.date }}.tar.gz admin@192.168.77.246:/tmp/' when: inventory_hostname in groups['nas']