mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2025-01-23 20:39:26 +00:00
bitwarden
This commit is contained in:
parent
c2e9d22bec
commit
278089a49d
@ -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']
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user