bitwarden

This commit is contained in:
jaydee 2024-06-03 00:38:40 +02:00
parent 01b9e06d51
commit 9f56d13aad

View File

@ -1,9 +1,6 @@
- hosts: router
name: Sync mailu
name: Switch destination
ignore_unreachable: false
vars:
app_path: "<MAIL_SERVER>25,143,465,993,995,587>192.168.77.106>dsadsad dsad dasdas-ddasd>TCP><WEB_SERVER>443,80>192.168.77.106>>TCP>"
new_ip_dest: "192.168.77.238"
tasks:
- name: Get ruleset
command: nvram get vts_rulelist
@ -14,7 +11,7 @@
msg: "var is {{ ruleset.stdout }}"
- name: initialize variables
set_fact:
regexp: "\\g<1>{{ new_ip_dest }}\\3"
regexp: "\\g<1>{{ DESTINATION }}\\3"
- set_fact:
app_path: "{{ ruleset.stdout | 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) }}"
- name: Print the gateway for each host when defined