From 5f31a2c5f6a79938e5790c43c7d91ba9b397179b Mon Sep 17 00:00:00 2001 From: jaydee Date: Wed, 1 Nov 2023 01:02:00 +0100 Subject: [PATCH] upt playbook --- playbooks/mailu_switch_to_primary.yaml | 49 ++++++++++++++++---------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/playbooks/mailu_switch_to_primary.yaml b/playbooks/mailu_switch_to_primary.yaml index 90c623f..a8dcb64 100644 --- a/playbooks/mailu_switch_to_primary.yaml +++ b/playbooks/mailu_switch_to_primary.yaml @@ -22,22 +22,35 @@ command: service restart_firewall when: inventory_hostname in groups['router'] - - name: Stop mailu rasp - uri: - url: "http://192.168.77.106:9000/api/stacks/{{ item }}/stop?endpointId=2" - method: POST - body_format: form-urlencoded - return_content: yes - headers: - Content-Type: "application/json" - X-API-Key: "ptr_DfS2M6Fj2P3fVvYpkhE0KJh2UGCzY47ePaFaLqadsjg=" - timeout: 60 - ignore_errors: yes - when: inventory_hostname in groups['nas'] - loop: - - 130 - - 149 - #- 140 - - 180 + # - name: Stop mailu rasp + # uri: + # url: "http://192.168.77.106:9000/api/stacks/{{ item }}/stop?endpointId=2" + # method: POST + # body_format: form-urlencoded + # return_content: yes + # headers: + # Content-Type: "application/json" + # X-API-Key: "ptr_DfS2M6Fj2P3fVvYpkhE0KJh2UGCzY47ePaFaLqadsjg=" + # timeout: 60 + # ignore_errors: yes + # when: inventory_hostname in groups['nas'] + # loop: + # - 130 + # - 149 + # #- 140 + # - 180 - \ No newline at end of file + - name: Stop mailu containers + command: docker pause {{ item }} + when: inventory_hostname in groups['raspberry'] + loop: + - mailu2-admin-1 + - mailu2-antispam-1 + - mailu2-antivirus-1 + - mailu2-fetchmail-1 + - mailu2-front-1 + - mailu2-imap-1 + - mailu2-oletools-1 + - mailu2-redis-1 + - mailu2-resolver-1 + - mailu2-smtp-1 \ No newline at end of file