From 278089a49d08fe9f036bfa1385e8fb028aa2a07c Mon Sep 17 00:00:00 2001 From: jaydee Date: Tue, 28 May 2024 01:04:09 +0200 Subject: [PATCH] bitwarden --- playbooks/mailu_switch_to_second.yaml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/playbooks/mailu_switch_to_second.yaml b/playbooks/mailu_switch_to_second.yaml index 6c9d3db..30065b7 100644 --- a/playbooks/mailu_switch_to_second.yaml +++ b/playbooks/mailu_switch_to_second.yaml @@ -54,28 +54,31 @@ - name: Print the gateway for each host when defined ansible.builtin.debug: msg: "var is {{ ruleset }}" + 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') }}" + when: inventory_hostname in groups['router'] - name: Print the gateway for each host when defined ansible.builtin.debug: msg: "var is {{ app_path }}" + 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']