mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2025-01-24 04:49:26 +00:00
bitwarden
This commit is contained in:
parent
516a05651d
commit
183520d19a
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
ignore_unreachable: false
|
ignore_unreachable: false
|
||||||
vars:
|
vars:
|
||||||
app_path33: "<MAIL_SERVER>25,143,465,993,995,587>192.168.77.106>>TCP><WEB_SERVER>443,80>192.168.77.106>>TCP>"
|
|
||||||
NEW_IP: 192.168.77.238
|
NEW_IP: 192.168.77.238
|
||||||
arch_name: docker_mailu2_data
|
arch_name: docker_mailu2_data
|
||||||
containers:
|
containers:
|
||||||
@ -39,17 +38,26 @@
|
|||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "var is {{ ruleset.stdout }}"
|
msg: "var is {{ ruleset.stdout }}"
|
||||||
when: inventory_hostname in groups['router']
|
when: inventory_hostname in groups['router']
|
||||||
|
|
||||||
|
|
||||||
- name: Print the gateway for each host when defined
|
- name: Print the gateway for each host when defined
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "var is {{ NEW_IP }}"
|
msg: "var is {{ NEW_IP }}"
|
||||||
when: inventory_hostname in groups['router']
|
when: inventory_hostname in groups['router']
|
||||||
|
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
app_path2: "{{ ruleset.stdout|string }}"
|
app_path2: "{{ ruleset.stdout }}"
|
||||||
when: inventory_hostname in groups['router']
|
when: inventory_hostname in groups['router']
|
||||||
|
|
||||||
|
|
||||||
|
- name: initialize variables
|
||||||
|
set_fact:
|
||||||
|
regexp: "\\g<1>{{ NEW_IP }}\\3"
|
||||||
|
when: inventory_hostname in groups['router']
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
app_path: "{{ app_path2 | regex_replace('(\\<MAIL_SERVER\\>[0-9,]{1,}\\>)([0-9.]{1,})(\\>[0-9a-zA-Z\\s-]{0,}\\>TCP\\>)', '\\1{{ app_path2 }}\\3') | regex_replace('(\\<WEB_SERVER\\>[0-9,]{1,}\\>)([0-9.]{1,})(\\>[0-9a-zA-Z\\s-]{0,}\\>TCP\\>)', '\\1{{ NEW_IP }}\\3') }}"
|
app_path: "{{ app_path2 | regex_replace('(\\<MAIL_SERVER\\>[0-9,]{1,}\\>)([0-9.]{1,})(\\>[0-9a-zA-Z\\s-]{0,}\\>TCP\\>)', regexp) | regex_replace('(\\<WEB_SERVER\\>[0-9,]{1,}\\>)([0-9.]{1,})(\\>[0-9a-zA-Z\\s-]{0,}\\>TCP\\>)', regexp) }}"
|
||||||
when: inventory_hostname in groups['router']
|
when: inventory_hostname in groups['router']
|
||||||
|
|
||||||
|
|
||||||
@ -57,10 +65,7 @@
|
|||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "var is {{ app_path }}"
|
msg: "var is {{ app_path }}"
|
||||||
when: inventory_hostname in groups['router']
|
when: inventory_hostname in groups['router']
|
||||||
- name: Print the gateway for each host when defined
|
|
||||||
ansible.builtin.debug:
|
|
||||||
msg: "var is {{ app_path33 }}"
|
|
||||||
when: inventory_hostname in groups['router']
|
|
||||||
|
|
||||||
# - name: Pause for 60 seconds
|
# - name: Pause for 60 seconds
|
||||||
# ansible.builtin.pause:
|
# ansible.builtin.pause:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user