From cacb62267e536d125afa6954d41202cf0e7f1310 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 6 Sep 2022 01:51:50 +0200 Subject: replace some more ipaddr() filter calls (cont'd) --- inventory/host_vars/ch-mon.yml | 16 ++++++++-------- inventory/host_vars/ch-router.yml | 20 ++++++++++---------- inventory/host_vars/ch-testvm-atlas.yml | 4 ++-- inventory/host_vars/ch-testvm-openwrt.yml | 10 +++++----- inventory/host_vars/ch-testvm-phoebe.yml | 6 +++--- inventory/host_vars/ch-testvm-prometheus.yml | 4 ++-- inventory/host_vars/ele-router-emc.yml | 14 +++++++------- inventory/host_vars/ele-router-hmtsaal.yml | 14 +++++++------- inventory/host_vars/ele-router-leslie.yml | 14 +++++++------- inventory/host_vars/ele-router.yml | 22 +++++++++++----------- 10 files changed, 62 insertions(+), 62 deletions(-) (limited to 'inventory/host_vars') diff --git a/inventory/host_vars/ch-mon.yml b/inventory/host_vars/ch-mon.yml index c8f0f215..ee9d12cc 100644 --- a/inventory/host_vars/ch-mon.yml +++ b/inventory/host_vars/ch-mon.yml @@ -32,17 +32,17 @@ network: interfaces: "{{ install.interfaces }}" primary: &_network_primary_ name: svc0 - address: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.svc.prefix | ansible.utils.ipaddr(network_zones.svc.offsets[inventory_hostname]) }}" gateway: "{{ network_zones.svc.gateway }}" static_routes: - destination: "{{ network_zones.lan.prefix }}" - gateway: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets['ch-gw-lan']) | ipaddr('address') }}" + gateway: "{{ network_zones.svc.prefix | ansible.utils.ipaddr(network_zones.svc.offsets['ch-gw-lan']) | ansible.utils.ipaddr('address') }}" interfaces: - *_network_primary_ - name: iot0 - address: "{{ network_zones.iot.prefix | ipaddr(network_zones.iot.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.iot.prefix | ansible.utils.ipaddr(network_zones.iot.offsets[inventory_hostname]) }}" - name: mgmt0 - address: "{{ network_zones.mgmt.prefix | ipaddr(network_zones.mgmt.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.mgmt.prefix | ansible.utils.ipaddr(network_zones.mgmt.offsets[inventory_hostname]) }}" lvm_groups: @@ -73,7 +73,7 @@ prometheus_server_alertmanager: username: server password: "{{ vault_prometheus_alertmanager_auth_user_passwords['server'] }}" -prometheus_server_web_external_url: "http://{{ network.primary.address | ipaddr('address') }}/prometheus/" +prometheus_server_web_external_url: "http://{{ network.primary.address | ansible.utils.ipaddr('address') }}/prometheus/" prometheus_server_auth_users: server: "{{ vault_prometheus_server_auth_user_passwords['server'] }}" @@ -119,7 +119,7 @@ prometheus_job_multitarget_blackbox__probe: module: http_tls_2xx - instance: "ssh-{{ inventory_hostname }}" - target: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets[inventory_hostname]) | ipaddr('address') }}:{{ ansible_port | default(22) }}" + target: "{{ network_zones.svc.prefix | ansible.utils.ipaddr(network_zones.svc.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}:{{ ansible_port | default(22) }}" module: ssh_banner prometheus_job_multitarget_ssl__probe: @@ -130,11 +130,11 @@ prometheus_job_multitarget_ssl__probe: prometheus_alertmanager_smtp: - smarthost: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets['ch-prometheus-legacy']) | ipaddr('address') }}:25" + smarthost: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets['ch-prometheus-legacy']) | ansible.utils.ipaddr('address') }}:25" from: "noreply@chaos-at-home.org" require_tls: no -prometheus_alertmanager_web_external_url: "http://{{ network.primary.address | ipaddr('address') }}/alertmanager/" +prometheus_alertmanager_web_external_url: "http://{{ network.primary.address | ansible.utils.ipaddr('address') }}/alertmanager/" prometheus_alertmanager_auth_users: server: "{{ vault_prometheus_alertmanager_auth_user_passwords['server'] }}" diff --git a/inventory/host_vars/ch-router.yml b/inventory/host_vars/ch-router.yml index 640fadf1..197179d2 100644 --- a/inventory/host_vars/ch-router.yml +++ b/inventory/host_vars/ch-router.yml @@ -296,15 +296,15 @@ openwrt_uci: options: device: eth0 proto: static - ipaddr: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets[inventory_hostname]) | ipaddr('address') }}" - netmask: "{{ network_zones.svc.prefix | ipaddr('netmask') }}" + ipaddr: "{{ network_zones.svc.prefix | ansible.utils.ipaddr(network_zones.svc.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}" + netmask: "{{ network_zones.svc.prefix | ansible.utils.ipaddr('netmask') }}" - name: interface 'magenta' options: device: eth1 proto: static - ipaddr: "{{ network_zones.magenta.prefix | ipaddr(network_zones.magenta.offsets[inventory_hostname]) | ipaddr('address') }}" - netmask: "{{ network_zones.magenta.prefix | ipaddr('netmask') }}" + ipaddr: "{{ network_zones.magenta.prefix | ansible.utils.ipaddr(network_zones.magenta.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}" + netmask: "{{ network_zones.magenta.prefix | ansible.utils.ipaddr('netmask') }}" gateway: "{{ network_zones.magenta.gateway }}" dns: "{{ network_zones.magenta.dns }}" @@ -312,15 +312,15 @@ openwrt_uci: options: device: eth2 proto: static - ipaddr: "{{ network_zones.mgmt.prefix | ipaddr(network_zones.mgmt.offsets[inventory_hostname]) | ipaddr('address') }}" - netmask: "{{ network_zones.mgmt.prefix | ipaddr('netmask') }}" + ipaddr: "{{ network_zones.mgmt.prefix | ansible.utils.ipaddr(network_zones.mgmt.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}" + netmask: "{{ network_zones.mgmt.prefix | ansible.utils.ipaddr('netmask') }}" - name: route 'lan' options: interface: svc - target: "{{ network_zones.lan.prefix | ipaddr('network') }}" - netmask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" - gateway: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets['ch-gw-lan']) | ipaddr('address') }}" + target: "{{ network_zones.lan.prefix | ansible.utils.ipaddr('network') }}" + netmask: "{{ network_zones.lan.prefix | ansible.utils.ipaddr('netmask') }}" + gateway: "{{ network_zones.svc.prefix | ansible.utils.ipaddr(network_zones.svc.offsets['ch-gw-lan']) | ansible.utils.ipaddr('address') }}" sqm: - name: queue 'magenta' @@ -341,6 +341,6 @@ openwrt_uci: overhead: '18 mpu 64 noatm' -prometheus_scrape_endpoint: "{{ network_zones.mgmt.prefix | ipaddr(network_zones.mgmt.offsets[inventory_hostname]) | ipaddr('address') }}:9100" +prometheus_scrape_endpoint: "{{ network_zones.mgmt.prefix | ansible.utils.ipaddr(network_zones.mgmt.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}:9100" prometheus_exporters_default: - openwrt diff --git a/inventory/host_vars/ch-testvm-atlas.yml b/inventory/host_vars/ch-testvm-atlas.yml index f647a97f..3f10a59e 100644 --- a/inventory/host_vars/ch-testvm-atlas.yml +++ b/inventory/host_vars/ch-testvm-atlas.yml @@ -25,9 +25,9 @@ network: interfaces: "{{ install.interfaces }}" primary: &_network_primary_ name: primary0 - address: "{{ vm_host.network.bridges.public.prefix | ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ vm_host.network.bridges.public.prefix | ansible.utils.ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) }}" gateway: "{{ vm_host.network.bridges.public.gateway }}" - address6: "{{ vm_host.network.bridges.public.prefix6 | ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address6: "{{ vm_host.network.bridges.public.prefix6 | ansible.utils.ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) }}" gateway6: "{{ vm_host.network.bridges.public.gateway6 }}" interfaces: - *_network_primary_ diff --git a/inventory/host_vars/ch-testvm-openwrt.yml b/inventory/host_vars/ch-testvm-openwrt.yml index a28c4ade..9c9b1bf7 100644 --- a/inventory/host_vars/ch-testvm-openwrt.yml +++ b/inventory/host_vars/ch-testvm-openwrt.yml @@ -94,14 +94,14 @@ openwrt_uci: options: device: eth0 proto: static - ipaddr: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets[inventory_hostname]) | ipaddr('address') }}" - netmask: "{{ network_zones.svc.prefix | ipaddr('netmask') }}" + ipaddr: "{{ network_zones.svc.prefix | ansible.utils.ipaddr(network_zones.svc.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}" + netmask: "{{ network_zones.svc.prefix | ansible.utils.ipaddr('netmask') }}" gateway: "{{ network_zones.svc.gateway }}" dns: "{{ network_zones.svc.dns }}" - name: route 'lan' options: interface: svc - target: "{{ network_zones.lan.prefix | ipaddr('network') }}" - netmask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" - gateway: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets['ch-gw-lan']) | ipaddr('address') }}" + target: "{{ network_zones.lan.prefix | ansible.utils.ipaddr('network') }}" + netmask: "{{ network_zones.lan.prefix | ansible.utils.ipaddr('netmask') }}" + gateway: "{{ network_zones.svc.prefix | ansible.utils.ipaddr(network_zones.svc.offsets['ch-gw-lan']) | ansible.utils.ipaddr('address') }}" diff --git a/inventory/host_vars/ch-testvm-phoebe.yml b/inventory/host_vars/ch-testvm-phoebe.yml index e480ae5d..109f820f 100644 --- a/inventory/host_vars/ch-testvm-phoebe.yml +++ b/inventory/host_vars/ch-testvm-phoebe.yml @@ -28,12 +28,12 @@ network: interfaces: "{{ install.interfaces }}" primary: &_network_primary_ name: svc0 - address: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.svc.prefix | ansible.utils.ipaddr(network_zones.svc.offsets[inventory_hostname]) }}" gateway: "{{ network_zones.svc.gateway }}" static_routes: - destination: "{{ network_zones.lan.prefix }}" - gateway: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets['ch-gw-lan']) | ipaddr('address') }}" + gateway: "{{ network_zones.svc.prefix | ansible.utils.ipaddr(network_zones.svc.offsets['ch-gw-lan']) | ansible.utils.ipaddr('address') }}" interfaces: - *_network_primary_ - name: iot0 - address: "{{ network_zones.iot.prefix | ipaddr(network_zones.iot.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.iot.prefix | ansible.utils.ipaddr(network_zones.iot.offsets[inventory_hostname]) }}" diff --git a/inventory/host_vars/ch-testvm-prometheus.yml b/inventory/host_vars/ch-testvm-prometheus.yml index ddc10a8e..f95366b0 100644 --- a/inventory/host_vars/ch-testvm-prometheus.yml +++ b/inventory/host_vars/ch-testvm-prometheus.yml @@ -26,10 +26,10 @@ network: interfaces: "{{ install.interfaces }}" primary: &_network_primary_ name: svc0 - address: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.svc.prefix | ansible.utils.ipaddr(network_zones.svc.offsets[inventory_hostname]) }}" gateway: "{{ network_zones.svc.gateway }}" static_routes: - destination: "{{ network_zones.lan.prefix }}" - gateway: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets['ch-gw-lan']) | ipaddr('address') }}" + gateway: "{{ network_zones.svc.prefix | ansible.utils.ipaddr(network_zones.svc.offsets['ch-gw-lan']) | ansible.utils.ipaddr('address') }}" interfaces: - *_network_primary_ diff --git a/inventory/host_vars/ele-router-emc.yml b/inventory/host_vars/ele-router-emc.yml index 5c159ff9..7384cb20 100644 --- a/inventory/host_vars/ele-router-emc.yml +++ b/inventory/host_vars/ele-router-emc.yml @@ -11,8 +11,8 @@ openwrt_network_external: options: device: 'eth5' proto: static - ipaddr: "{{ network_zones.cc_hmtsaal.prefix | ipaddr(network_zones.cc_hmtsaal.offsets[inventory_hostname]) | ipaddr('address') }}" - netmask: "{{ network_zones.cc_hmtsaal.prefix | ipaddr('netmask') }}" + ipaddr: "{{ network_zones.cc_hmtsaal.prefix | ansible.utils.ipaddr(network_zones.cc_hmtsaal.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}" + netmask: "{{ network_zones.cc_hmtsaal.prefix | ansible.utils.ipaddr('netmask') }}" gateway: "{{ network_zones.cc_hmtsaal.gateway }}" dns: "{{ network_zones.cc_hmtsaal.dns }}" accept_ra: 0 @@ -25,7 +25,7 @@ openwrt_network_internal_yaml: | device: "eth0.{{ network_zones[zone_name].vlan }}" proto: static ipaddr: "{{ network_zones[zone_name].gateway }}" - netmask: "{{ network_zones[zone_name].prefix | ipaddr('netmask') }}" + netmask: "{{ network_zones[zone_name].prefix | ansible.utils.ipaddr('netmask') }}" accept_ra: 0 {% endfor %} @@ -46,8 +46,8 @@ openwrt_network_base: options: device: "eth0.{{ network_mgmt_zone.vlan }}" proto: static - ipaddr: "{{ network_mgmt_zone.prefix | ipaddr(network_mgmt_zone.offsets[inventory_hostname]) | ipaddr('address') }}" - netmask: "{{ network_mgmt_zone.prefix | ipaddr('netmask') }}" + ipaddr: "{{ network_mgmt_zone.prefix | ansible.utils.ipaddr(network_mgmt_zone.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}" + netmask: "{{ network_mgmt_zone.prefix | ansible.utils.ipaddr('netmask') }}" accept_ra: 0 @@ -176,7 +176,7 @@ openwrt_mixin: flush ruleset define nic_citycom = eth5 - define ip_citycom = {{ network_zones.cc_hmtsaal.prefix | ipaddr(network_zones.cc_hmtsaal.offsets[inventory_hostname]) | ipaddr('address') }} + define ip_citycom = {{ network_zones.cc_hmtsaal.prefix | ansible.utils.ipaddr(network_zones.cc_hmtsaal.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }} define nic_mgmt = "eth0.{{ network_mgmt_zone.vlan }}" define prefix_mgmt = {{ network_mgmt_zone.prefix }} @@ -260,6 +260,6 @@ openwrt_uci: network: "{{ openwrt_network_base + openwrt_network_internal + openwrt_network_external }}" -prometheus_scrape_endpoint: "{{ network_mgmt_zone.prefix | ipaddr(network_mgmt_zone.offsets[inventory_hostname]) | ipaddr('address') }}:9100" +prometheus_scrape_endpoint: "{{ network_mgmt_zone.prefix | ansible.utils.ipaddr(network_mgmt_zone.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}:9100" prometheus_exporters_default: - openwrt diff --git a/inventory/host_vars/ele-router-hmtsaal.yml b/inventory/host_vars/ele-router-hmtsaal.yml index 70823da3..826d4df6 100644 --- a/inventory/host_vars/ele-router-hmtsaal.yml +++ b/inventory/host_vars/ele-router-hmtsaal.yml @@ -13,8 +13,8 @@ openwrt_network_external: options: device: 'eth1' proto: static - ipaddr: "{{ network_zones.cc_hmtsaal.prefix | ipaddr(network_zones.cc_hmtsaal.offsets[inventory_hostname]) | ipaddr('address') }}" - netmask: "{{ network_zones.cc_hmtsaal.prefix | ipaddr('netmask') }}" + ipaddr: "{{ network_zones.cc_hmtsaal.prefix | ansible.utils.ipaddr(network_zones.cc_hmtsaal.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}" + netmask: "{{ network_zones.cc_hmtsaal.prefix | ansible.utils.ipaddr('netmask') }}" gateway: "{{ network_zones.cc_hmtsaal.gateway }}" dns: "{{ network_zones.cc_hmtsaal.dns }}" accept_ra: 0 @@ -27,7 +27,7 @@ openwrt_network_internal_yaml: | device: "eth0.{{ network_zones[zone_name].vlan }}" proto: static ipaddr: "{{ network_zones[zone_name].gateway }}" - netmask: "{{ network_zones[zone_name].prefix | ipaddr('netmask') }}" + netmask: "{{ network_zones[zone_name].prefix | ansible.utils.ipaddr('netmask') }}" accept_ra: 0 {% endfor %} @@ -48,8 +48,8 @@ openwrt_network_base: options: device: "eth0.{{ network_mgmt_zone.vlan }}" proto: static - ipaddr: "{{ network_mgmt_zone.prefix | ipaddr(network_mgmt_zone.offsets[inventory_hostname]) | ipaddr('address') }}" - netmask: "{{ network_mgmt_zone.prefix | ipaddr('netmask') }}" + ipaddr: "{{ network_mgmt_zone.prefix | ansible.utils.ipaddr(network_mgmt_zone.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}" + netmask: "{{ network_mgmt_zone.prefix | ansible.utils.ipaddr('netmask') }}" accept_ra: 0 @@ -179,7 +179,7 @@ openwrt_mixin: flush ruleset define nic_citycom = eth1 - define ip_citycom = {{ network_zones.cc_hmtsaal.prefix | ipaddr(network_zones.cc_hmtsaal.offsets[inventory_hostname]) | ipaddr('address') }} + define ip_citycom = {{ network_zones.cc_hmtsaal.prefix | ansible.utils.ipaddr(network_zones.cc_hmtsaal.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }} define nic_mgmt = "eth0.{{ network_mgmt_zone.vlan }}" define prefix_mgmt = {{ network_mgmt_zone.prefix }} @@ -280,6 +280,6 @@ openwrt_uci: linklayer: 'ethernet' overhead: '44 mpu 84' -prometheus_scrape_endpoint: "{{ network_mgmt_zone.prefix | ipaddr(network_mgmt_zone.offsets[inventory_hostname]) | ipaddr('address') }}:9100" +prometheus_scrape_endpoint: "{{ network_mgmt_zone.prefix | ansible.utils.ipaddr(network_mgmt_zone.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}:9100" prometheus_exporters_default: - openwrt diff --git a/inventory/host_vars/ele-router-leslie.yml b/inventory/host_vars/ele-router-leslie.yml index 27928938..2bee033e 100644 --- a/inventory/host_vars/ele-router-leslie.yml +++ b/inventory/host_vars/ele-router-leslie.yml @@ -13,8 +13,8 @@ openwrt_network_external: options: device: 'eth1' proto: static - ipaddr: "{{ network_zones.cc_leslie.prefix | ipaddr(network_zones.cc_leslie.offsets[inventory_hostname]) | ipaddr('address') }}" - netmask: "{{ network_zones.cc_leslie.prefix | ipaddr('netmask') }}" + ipaddr: "{{ network_zones.cc_leslie.prefix | ansible.utils.ipaddr(network_zones.cc_leslie.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}" + netmask: "{{ network_zones.cc_leslie.prefix | ansible.utils.ipaddr('netmask') }}" gateway: "{{ network_zones.cc_leslie.gateway }}" dns: "{{ network_zones.cc_leslie.dns }}" accept_ra: 0 @@ -27,7 +27,7 @@ openwrt_network_internal_yaml: | device: "eth0.{{ network_zones[zone_name].vlan }}" proto: static ipaddr: "{{ network_zones[zone_name].gateway }}" - netmask: "{{ network_zones[zone_name].prefix | ipaddr('netmask') }}" + netmask: "{{ network_zones[zone_name].prefix | ansible.utils.ipaddr('netmask') }}" accept_ra: 0 {% endfor %} @@ -48,8 +48,8 @@ openwrt_network_base: options: device: "eth0.{{ network_mgmt_zone.vlan }}" proto: static - ipaddr: "{{ network_mgmt_zone.prefix | ipaddr(network_mgmt_zone.offsets[inventory_hostname]) | ipaddr('address') }}" - netmask: "{{ network_mgmt_zone.prefix | ipaddr('netmask') }}" + ipaddr: "{{ network_mgmt_zone.prefix | ansible.utils.ipaddr(network_mgmt_zone.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}" + netmask: "{{ network_mgmt_zone.prefix | ansible.utils.ipaddr('netmask') }}" accept_ra: 0 @@ -179,7 +179,7 @@ openwrt_mixin: flush ruleset define nic_citycom = eth1 - define ip_citycom = {{ network_zones.cc_leslie.prefix | ipaddr(network_zones.cc_leslie.offsets[inventory_hostname]) | ipaddr('address') }} + define ip_citycom = {{ network_zones.cc_leslie.prefix | ansible.utils.ipaddr(network_zones.cc_leslie.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }} define nic_mgmt = "eth0.{{ network_mgmt_zone.vlan }}" define prefix_mgmt = {{ network_mgmt_zone.prefix }} @@ -280,6 +280,6 @@ openwrt_uci: linklayer: 'ethernet' overhead: '44 mpu 84' -prometheus_scrape_endpoint: "{{ network_mgmt_zone.prefix | ipaddr(network_mgmt_zone.offsets[inventory_hostname]) | ipaddr('address') }}:9100" +prometheus_scrape_endpoint: "{{ network_mgmt_zone.prefix | ansible.utils.ipaddr(network_mgmt_zone.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}:9100" prometheus_exporters_default: - openwrt diff --git a/inventory/host_vars/ele-router.yml b/inventory/host_vars/ele-router.yml index 33c8fa9b..bddb40e8 100644 --- a/inventory/host_vars/ele-router.yml +++ b/inventory/host_vars/ele-router.yml @@ -32,14 +32,14 @@ openwrt_network_external: options: device: 'eth5' proto: static - ipaddr: "{{ network_zones.murat_transfer.prefix | ipaddr(network_zones.murat_transfer.offsets[inventory_hostname]) | ipaddr('address') }}" - netmask: "{{ network_zones.murat_transfer.prefix | ipaddr('netmask') }}" + ipaddr: "{{ network_zones.murat_transfer.prefix | ansible.utils.ipaddr(network_zones.murat_transfer.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}" + netmask: "{{ network_zones.murat_transfer.prefix | ansible.utils.ipaddr('netmask') }}" accept_ra: 0 - name: rule options: priority: 41050 - src: "{{ network_zones.murat_transfer.prefix | ipaddr(network_zones.murat_transfer.offsets[inventory_hostname]) | ipaddr('address') }}/32" + src: "{{ network_zones.murat_transfer.prefix | ansible.utils.ipaddr(network_zones.murat_transfer.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}/32" lookup: 105 - name: rule @@ -53,21 +53,21 @@ openwrt_network_external: interface: 'wanmur' table: 105 target: '0.0.0.0/0' - gateway: "{{ network_zones.murat_transfer.prefix | ipaddr(network_zones.murat_transfer.offsets['ele-mur']) | ipaddr('address') }}" + gateway: "{{ network_zones.murat_transfer.prefix | ansible.utils.ipaddr(network_zones.murat_transfer.offsets['ele-mur']) | ansible.utils.ipaddr('address') }}" - name: interface 'wanlte' options: device: 'eth4' proto: static - ipaddr: "{{ network_zones.datacop_lte.prefix | ipaddr(network_zones.datacop_lte.offsets[inventory_hostname]) | ipaddr('address') }}" - netmask: "{{ network_zones.datacop_lte.prefix | ipaddr('netmask') }}" + ipaddr: "{{ network_zones.datacop_lte.prefix | ansible.utils.ipaddr(network_zones.datacop_lte.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}" + netmask: "{{ network_zones.datacop_lte.prefix | ansible.utils.ipaddr('netmask') }}" accept_ra: 0 - name: rule options: priority: 41040 - src: "{{ network_zones.datacop_lte.prefix | ipaddr(network_zones.datacop_lte.offsets[inventory_hostname]) | ipaddr('address') }}/32" + src: "{{ network_zones.datacop_lte.prefix | ansible.utils.ipaddr(network_zones.datacop_lte.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}/32" lookup: 104 - name: rule @@ -107,7 +107,7 @@ openwrt_network_internal_yaml: | device: "eth0.{{ network_zones[zone_name].vlan }}" proto: static ipaddr: "{{ network_zones[zone_name].gateway }}" - netmask: "{{ network_zones[zone_name].prefix | ipaddr('netmask') }}" + netmask: "{{ network_zones[zone_name].prefix | ansible.utils.ipaddr('netmask') }}" accept_ra: 0 {% endfor %} @@ -128,8 +128,8 @@ openwrt_network_base: options: device: "eth0.{{ network_mgmt_zone.vlan }}" proto: static - ipaddr: "{{ network_mgmt_zone.prefix | ipaddr(network_mgmt_zone.offsets[inventory_hostname]) | ipaddr('address') }}" - netmask: "{{ network_mgmt_zone.prefix | ipaddr('netmask') }}" + ipaddr: "{{ network_mgmt_zone.prefix | ansible.utils.ipaddr(network_mgmt_zone.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}" + netmask: "{{ network_mgmt_zone.prefix | ansible.utils.ipaddr('netmask') }}" accept_ra: 0 @@ -400,6 +400,6 @@ openwrt_uci: network: "{{ openwrt_network_base + openwrt_network_internal + openwrt_network_external }}" -prometheus_scrape_endpoint: "{{ network_mgmt_zone.prefix | ipaddr(network_mgmt_zone.offsets[inventory_hostname]) | ipaddr('address') }}:9100" +prometheus_scrape_endpoint: "{{ network_mgmt_zone.prefix | ansible.utils.ipaddr(network_mgmt_zone.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}:9100" prometheus_exporters_default: - openwrt -- cgit v1.2.3