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
94df1b930c
commit
3c62fa4b6b
@ -3,6 +3,7 @@
|
||||
|
||||
ignore_unreachable: false
|
||||
vars:
|
||||
NEW_IP: 192.168.77.238
|
||||
arch_name: docker_mailu2_data
|
||||
containers:
|
||||
- nginx-app-1
|
||||
@ -49,13 +50,23 @@
|
||||
command: nvram get vts_rulelist
|
||||
when: inventory_hostname in groups['router']
|
||||
register: ruleset
|
||||
|
||||
|
||||
- name: Print the gateway for each host when defined
|
||||
ansible.builtin.debug:
|
||||
msg: "var is {{ app_path }}"
|
||||
- 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') }}"
|
||||
- name: Print the gateway for each host when defined
|
||||
ansible.builtin.debug:
|
||||
msg: "var is {{ app_path }}"
|
||||
|
||||
|
||||
- name: Pause for 60 seconds
|
||||
ansible.builtin.pause:
|
||||
seconds: 60
|
||||
|
||||
- name: Set new ruleset
|
||||
command: nvram set vts_rulelist="{{ ruleset.stdout | replace('192.168.77.106', '192.168.77.246') }}"
|
||||
command: nvram set vts_rulelist="{{ app_path }}"
|
||||
when: inventory_hostname in groups['router']
|
||||
|
||||
- name: Nvram commit
|
||||
|
Loading…
x
Reference in New Issue
Block a user