bitwarden

This commit is contained in:
jaydee 2024-05-28 01:04:09 +02:00
parent c2e9d22bec
commit 278089a49d

View File

@ -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('(\\<MAIL_SERVER\\>[0-9,]{1,}\\>)([0-9.]{1,})(\\>[0-9a-zA-Z\\s-]{0,}\\>TCP\\>)', '\\1{{ NEW_IP }}\\3') | regex_replace('(\\<WEB_SERVER\\>[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']