diff --git a/playbooks/mailu_switch_to_second.yaml b/playbooks/mailu_switch_to_second.yaml index 30065b7..b90e117 100644 --- a/playbooks/mailu_switch_to_second.yaml +++ b/playbooks/mailu_switch_to_second.yaml @@ -41,7 +41,7 @@ # #- 140 # - 180 - name: Start mailu containers - command: "docker restart {{ containers | join(' ') }}" + command: "docker start {{ containers | join(' ') }}" become: true ignore_errors: true when: inventory_hostname in groups['raspberrypi5'] @@ -53,7 +53,11 @@ - name: Print the gateway for each host when defined ansible.builtin.debug: - msg: "var is {{ ruleset }}" + msg: "var is {{ ruleset.stdout }}" + when: inventory_hostname in groups['router'] + - name: Print the gateway for each host when defined + ansible.builtin.debug: + 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') }}"