diff --git a/playbooks/mailu_switch_to_second.yaml b/playbooks/mailu_switch_to_second.yaml index 2b50d0d..ceb9e12 100644 --- a/playbooks/mailu_switch_to_second.yaml +++ b/playbooks/mailu_switch_to_second.yaml @@ -3,7 +3,6 @@ ignore_unreachable: false vars: - NEW_IP: 192.168.77.238 arch_name: docker_mailu2_data containers: - nginx-app-1 @@ -42,12 +41,12 @@ - name: Print the gateway for each host when defined ansible.builtin.debug: - msg: "var is {{ NEW_IP }}" + msg: "var is {{ destination }}" when: inventory_hostname in groups['router'] - name: initialize variables set_fact: - regexp: "\\g<1>{{ NEW_IP }}\\3" + regexp: "\\g<1>{{ destination }}\\3" when: inventory_hostname in groups['router'] - set_fact: @@ -61,21 +60,21 @@ when: inventory_hostname in groups['router'] - # - name: Pause for 60 seconds - # ansible.builtin.pause: - # seconds: 60 + - name: Pause for 60 seconds + ansible.builtin.pause: + seconds: 60 - # - name: Set new ruleset - # command: nvram set vts_rulelist="{{ app_path }}" - # when: inventory_hostname in groups['router'] + - name: Set new ruleset + command: nvram set vts_rulelist="{{ app_path }}" + when: inventory_hostname in groups['router'] - # - name: Nvram commit - # command: nvram commit - # when: inventory_hostname in groups['router'] + - name: Nvram commit + command: nvram commit + when: inventory_hostname in groups['router'] - # - name: Restart firewall - # command: service restart_firewall - # when: inventory_hostname in groups['router'] + - name: Restart firewall + command: service restart_firewall + when: inventory_hostname in groups['router']