From 68f50e325fff3c2991d46c8b5c7b5d7de134685d Mon Sep 17 00:00:00 2001 From: jaydee Date: Tue, 28 May 2024 01:12:42 +0200 Subject: [PATCH] bitwarden --- playbooks/mailu_switch_to_second.yaml | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/playbooks/mailu_switch_to_second.yaml b/playbooks/mailu_switch_to_second.yaml index b90e117..1f33e97 100644 --- a/playbooks/mailu_switch_to_second.yaml +++ b/playbooks/mailu_switch_to_second.yaml @@ -23,23 +23,6 @@ - HomeAssistant - mosquitto-mosquitto-1 tasks: - # - name: Start mailu rasp - # uri: - # url: "http://192.168.77.106:9000/api/stacks/{{ item }}/start?endpointId=13" - # 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: Start mailu containers command: "docker start {{ containers | join(' ') }}" become: true @@ -60,7 +43,10 @@ msg: "var is {{ NEW_IP }}" when: inventory_hostname in groups['router'] - set_fact: - app_path: "{{ ruleset.stdout | regex_replace('(\\[0-9,]{1,}\\>)([0-9.]{1,})(\\>[0-9a-zA-Z\\s-]{0,}\\>TCP\\>)', '\\1{{ NEW_IP }}\\3') | regex_replace('(\\[0-9,]{1,}\\>)([0-9.]{1,})(\\>[0-9a-zA-Z\\s-]{0,}\\>TCP\\>)', '\\1{{ NEW_IP }}\\3') }}" + app_path2: "{{ ruleset.stdout }}" + when: inventory_hostname in groups['router'] + - set_fact: + app_path: "{{ app_path2 | regex_replace('(\\[0-9,]{1,}\\>)([0-9.]{1,})(\\>[0-9a-zA-Z\\s-]{0,}\\>TCP\\>)', '\\1{{ NEW_IP }}\\3') | regex_replace('(\\[0-9,]{1,}\\>)([0-9.]{1,})(\\>[0-9a-zA-Z\\s-]{0,}\\>TCP\\>)', '\\1{{ NEW_IP }}\\3') }}" when: inventory_hostname in groups['router'] - name: Print the gateway for each host when defined ansible.builtin.debug: