bitwarden

This commit is contained in:
jaydee 2024-05-28 00:41:00 +02:00
parent 94df1b930c
commit 3c62fa4b6b

View File

@ -3,6 +3,7 @@
ignore_unreachable: false ignore_unreachable: false
vars: vars:
NEW_IP: 192.168.77.238
arch_name: docker_mailu2_data arch_name: docker_mailu2_data
containers: containers:
- nginx-app-1 - nginx-app-1
@ -50,12 +51,22 @@
when: inventory_hostname in groups['router'] when: inventory_hostname in groups['router']
register: ruleset 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 - name: Pause for 60 seconds
ansible.builtin.pause: ansible.builtin.pause:
seconds: 60 seconds: 60
- name: Set new ruleset - 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'] when: inventory_hostname in groups['router']
- name: Nvram commit - name: Nvram commit