From ccdb42c40ce909c1026835b757984cf4cff7a940 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 6 Sep 2022 02:24:00 +0200 Subject: replace remaining ipaddr() filter calls --- inventory/host_vars/ch-alix1d.yml | 6 +++--- inventory/host_vars/ch-atlas.yml | 6 +++--- inventory/host_vars/ch-auth-legacy.yml | 4 ++-- inventory/host_vars/ch-cm4-test.yml | 2 +- inventory/host_vars/ch-epimetheus.yml | 10 +++++----- inventory/host_vars/ch-iot.yml | 6 +++--- inventory/host_vars/ch-jump.yml | 6 +++--- inventory/host_vars/ch-k8s-ctrl.yml | 4 ++-- inventory/host_vars/ch-keyserver.yml | 4 ++-- inventory/host_vars/ch-mc-pi.yml | 2 +- inventory/host_vars/ch-mc.yml | 2 +- inventory/host_vars/ch-mimas.yml | 6 +++--- inventory/host_vars/ch-nic.yml | 4 ++-- inventory/host_vars/ch-omd.yml | 4 ++-- inventory/host_vars/ch-router-obsd.yml | 4 ++-- inventory/host_vars/ch-vpn.yml | 4 ++-- inventory/host_vars/ele-emc-ctrl.yml | 6 +++--- inventory/host_vars/ele-gwhetzner.yml | 6 +++--- inventory/host_vars/ele-hpws-maxi.yml | 4 ++-- inventory/host_vars/ele-hpws-mini1.yml | 4 ++-- inventory/host_vars/ele-hpws-mini2.yml | 2 +- inventory/host_vars/ele-laptop.yml | 2 +- inventory/host_vars/ele-media.yml | 2 +- inventory/host_vars/ele-minidan.yml | 2 +- inventory/host_vars/ele-mur.yml | 10 +++++----- inventory/host_vars/ele-orpheum.yml | 4 ++-- inventory/host_vars/ele-tsdatacop.yml | 4 ++-- inventory/host_vars/ele-uhrturm.yml | 2 +- inventory/host_vars/r3-vex2.yml | 4 ++-- 29 files changed, 63 insertions(+), 63 deletions(-) diff --git a/inventory/host_vars/ch-alix1d.yml b/inventory/host_vars/ch-alix1d.yml index 9e579648..f4b52487 100644 --- a/inventory/host_vars/ch-alix1d.yml +++ b/inventory/host_vars/ch-alix1d.yml @@ -167,8 +167,8 @@ openwrt_uci: options: device: eth0 proto: static - ipaddr: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}" - netmask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" + ipaddr: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}" + netmask: "{{ network_zones.lan.prefix | ansible.utils.ipaddr('netmask') }}" gateway: "{{ network_zones.lan.gateway }}" dns: "{{ network_zones.lan.dns }}" @@ -178,7 +178,7 @@ openwrt_uci: proto: none -prometheus_scrape_endpoint: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}:9100" +prometheus_scrape_endpoint: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}:9100" prometheus_exporters_default: - openwrt diff --git a/inventory/host_vars/ch-atlas.yml b/inventory/host_vars/ch-atlas.yml index ce700f4d..7bf990c9 100644 --- a/inventory/host_vars/ch-atlas.yml +++ b/inventory/host_vars/ch-atlas.yml @@ -14,10 +14,10 @@ network: domain: "{{ host_domain }}" primary: &_network_primary_ name: br-public - 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.offsets6[inventory_hostname]) | ipaddr('address/prefix') }}" - address6: "{{ vm_host.network.bridges.public.prefix6 | ipaddr(41) | ipaddr('address/prefix') }}" +# address6: "{{ vm_host.network.bridges.public.prefix6 | ansible.utils.ipaddr(vm_host.network.bridges.public.offsets6[inventory_hostname]) }}" + address6: "{{ vm_host.network.bridges.public.prefix6 | ansible.utils.ipaddr(41) }}" gateway6: "{{ vm_host.network.bridges.public.gateway6 }}" interfaces: - *_network_primary_ diff --git a/inventory/host_vars/ch-auth-legacy.yml b/inventory/host_vars/ch-auth-legacy.yml index c06796cb..acd36b7a 100644 --- a/inventory/host_vars/ch-auth-legacy.yml +++ b/inventory/host_vars/ch-auth-legacy.yml @@ -24,10 +24,10 @@ network: interfaces: "{{ install.interfaces }}" primary: &_network_primary_ name: eth0 - 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/ch-cm4-test.yml b/inventory/host_vars/ch-cm4-test.yml index e6bc9081..5d9829fb 100644 --- a/inventory/host_vars/ch-cm4-test.yml +++ b/inventory/host_vars/ch-cm4-test.yml @@ -7,7 +7,7 @@ network: domain: "{{ host_domain }}" primary: &_network_primary_ name: eth0 - address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) }}" gateway: "{{ network_zones.lan.gateway }}" interfaces: - *_network_primary_ diff --git a/inventory/host_vars/ch-epimetheus.yml b/inventory/host_vars/ch-epimetheus.yml index 5e00b0cd..c528d71a 100644 --- a/inventory/host_vars/ch-epimetheus.yml +++ b/inventory/host_vars/ch-epimetheus.yml @@ -9,7 +9,7 @@ network: domain: "{{ host_domain }}" primary: &_network_primary_ name: enp1s0 - address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) }}" gateway: "{{ network_zones.lan.gateway }}" interfaces: - *_network_primary_ @@ -37,7 +37,7 @@ prometheus_exporters_extra: prometheus_job_multitarget_blackbox__probe: ch-mon: - instance: "ssh-{{ inventory_hostname }}" - target: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}:{{ ansible_port | default(22) }}" + target: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}:{{ ansible_port | default(22) }}" module: ssh_banner prometheus_job_multitarget_ssl__probe: @@ -98,7 +98,7 @@ zfs_sanoid_modules: zfs_syncoid_target_pool: backup zfs_syncoid_sources: 'ch-prometheus': - ssh_hostname: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets['ch-prometheus']) | ipaddr('address') }}" + ssh_hostname: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets['ch-prometheus']) | ansible.utils.ipaddr('address') }}" ssh_port: "{{ hostvars['ch-prometheus'].ansible_port }}" report_prometheus_textfile_path: "/var/lib/prometheus-node-exporter/textfile-collector" periodic: @@ -117,7 +117,7 @@ zfs_syncoid_sources: exclude: - '^storage/vm' 'ch-phoebe': - ssh_hostname: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets['ch-phoebe']) | ipaddr('address') }}" + ssh_hostname: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets['ch-phoebe']) | ansible.utils.ipaddr('address') }}" ssh_port: "{{ hostvars['ch-phoebe'].ansible_port }}" report_prometheus_textfile_path: "/var/lib/prometheus-node-exporter/textfile-collector" periodic: @@ -128,7 +128,7 @@ zfs_syncoid_sources: recursive: yes skip_parent: yes 'ch-apps': - ssh_hostname: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets['ch-apps']) | ipaddr('address') }}" + ssh_hostname: "{{ network_zones.svc.prefix | ansible.utils.ipaddr(network_zones.svc.offsets['ch-apps']) | ansible.utils.ipaddr('address') }}" ssh_port: "{{ hostvars['ch-apps'].ansible_port }}" report_prometheus_textfile_path: "/var/lib/prometheus-node-exporter/textfile-collector" periodic: diff --git a/inventory/host_vars/ch-iot.yml b/inventory/host_vars/ch-iot.yml index 88a5533a..cbdff09c 100644 --- a/inventory/host_vars/ch-iot.yml +++ b/inventory/host_vars/ch-iot.yml @@ -26,15 +26,15 @@ 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]) }}" ntp_variant: chrony diff --git a/inventory/host_vars/ch-jump.yml b/inventory/host_vars/ch-jump.yml index 8514d68c..4919a7ce 100644 --- a/inventory/host_vars/ch-jump.yml +++ b/inventory/host_vars/ch-jump.yml @@ -26,15 +26,15 @@ 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: 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]) }}" sshd_jump_users: diff --git a/inventory/host_vars/ch-k8s-ctrl.yml b/inventory/host_vars/ch-k8s-ctrl.yml index 86b1d225..ece6cb73 100644 --- a/inventory/host_vars/ch-k8s-ctrl.yml +++ b/inventory/host_vars/ch-k8s-ctrl.yml @@ -27,11 +27,11 @@ 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/ch-keyserver.yml b/inventory/host_vars/ch-keyserver.yml index b5519d46..c2b62d81 100644 --- a/inventory/host_vars/ch-keyserver.yml +++ b/inventory/host_vars/ch-keyserver.yml @@ -24,9 +24,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-mc-pi.yml b/inventory/host_vars/ch-mc-pi.yml index 064ad560..9f46a600 100644 --- a/inventory/host_vars/ch-mc-pi.yml +++ b/inventory/host_vars/ch-mc-pi.yml @@ -7,7 +7,7 @@ network: domain: "{{ host_domain }}" primary: &_network_primary_ name: eth0 - address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) }}" gateway: "{{ network_zones.lan.gateway }}" interfaces: - *_network_primary_ diff --git a/inventory/host_vars/ch-mc.yml b/inventory/host_vars/ch-mc.yml index e43c0675..93578edd 100644 --- a/inventory/host_vars/ch-mc.yml +++ b/inventory/host_vars/ch-mc.yml @@ -35,7 +35,7 @@ network: domain: "{{ host_domain }}" primary: &_network_primary_ name: eno1 - address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) }}" gateway: "{{ network_zones.lan.gateway }}" interfaces: - *_network_primary_ diff --git a/inventory/host_vars/ch-mimas.yml b/inventory/host_vars/ch-mimas.yml index 724983a3..a15ebb43 100644 --- a/inventory/host_vars/ch-mimas.yml +++ b/inventory/host_vars/ch-mimas.yml @@ -22,10 +22,10 @@ network: interfaces: "{{ install.interfaces }}" primary: &_network_primary_ name: eth0 - address: "{{ vm_host.network.bridges.public.prefix | ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" - gateway: "{{ vm_host.network.bridges.public.prefix | ipaddr(vm_host.network.bridges.public.offsets[vm_host.name]) | ipaddr('address') }}" + address: "{{ vm_host.network.bridges.public.prefix | ansible.utils.ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) }}" + gateway: "{{ vm_host.network.bridges.public.prefix | ansible.utils.ipaddr(vm_host.network.bridges.public.offsets[vm_host.name]) | ansible.utils.ipaddr('address') }}" template: overlay - overlay: "{{ (vm_host.network.bridges.public.overlays.default.prefix | ipaddr(vm_host.network.bridges.public.overlays.default.offsets[inventory_hostname])).split('/')[0] }}" + overlay: "{{ (vm_host.network.bridges.public.overlays.default.prefix | ansible.utils.ipaddr(vm_host.network.bridges.public.overlays.default.offsets[inventory_hostname])).split('/')[0] }}" interfaces: - *_network_primary_ diff --git a/inventory/host_vars/ch-nic.yml b/inventory/host_vars/ch-nic.yml index 4a323853..1a4adf29 100644 --- a/inventory/host_vars/ch-nic.yml +++ b/inventory/host_vars/ch-nic.yml @@ -25,10 +25,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/ch-omd.yml b/inventory/host_vars/ch-omd.yml index 6c2e549c..80c6d632 100644 --- a/inventory/host_vars/ch-omd.yml +++ b/inventory/host_vars/ch-omd.yml @@ -46,10 +46,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/ch-router-obsd.yml b/inventory/host_vars/ch-router-obsd.yml index 610bf779..61496df0 100644 --- a/inventory/host_vars/ch-router-obsd.yml +++ b/inventory/host_vars/ch-router-obsd.yml @@ -22,11 +22,11 @@ network: domain: "{{ host_domain }}" primary: &_network_primary_ name: vio0 - 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/ch-vpn.yml b/inventory/host_vars/ch-vpn.yml index d1dba82e..0961387f 100644 --- a/inventory/host_vars/ch-vpn.yml +++ b/inventory/host_vars/ch-vpn.yml @@ -29,10 +29,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-emc-ctrl.yml b/inventory/host_vars/ele-emc-ctrl.yml index f926c7d2..6b76c39d 100644 --- a/inventory/host_vars/ele-emc-ctrl.yml +++ b/inventory/host_vars/ele-emc-ctrl.yml @@ -26,10 +26,10 @@ 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') }}" - gateway: "{{ vm_host.network.bridges.public.prefix | ipaddr(vm_host.network.bridges.public.offsets[vm_host.name]) | ipaddr('address') }}" + address: "{{ vm_host.network.bridges.public.prefix | ansible.utils.ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) }}" + gateway: "{{ vm_host.network.bridges.public.prefix | ansible.utils.ipaddr(vm_host.network.bridges.public.offsets[vm_host.name]) | ansible.utils.ipaddr('address') }}" template: overlay - overlay: "{{ (vm_host.network.bridges.public.overlays.default.prefix | ipaddr(vm_host.network.bridges.public.overlays.default.offsets[inventory_hostname])).split('/')[0] }}" + overlay: "{{ (vm_host.network.bridges.public.overlays.default.prefix | ansible.utils.ipaddr(vm_host.network.bridges.public.overlays.default.offsets[inventory_hostname])).split('/')[0] }}" interfaces: - *_network_primary_ diff --git a/inventory/host_vars/ele-gwhetzner.yml b/inventory/host_vars/ele-gwhetzner.yml index 64c8e157..aa9cc7b3 100644 --- a/inventory/host_vars/ele-gwhetzner.yml +++ b/inventory/host_vars/ele-gwhetzner.yml @@ -22,10 +22,10 @@ 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') }}" - gateway: "{{ vm_host.network.bridges.public.prefix | ipaddr(vm_host.network.bridges.public.offsets[vm_host.name]) | ipaddr('address') }}" + address: "{{ vm_host.network.bridges.public.prefix | ansible.utils.ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) }}" + gateway: "{{ vm_host.network.bridges.public.prefix | ansible.utils.ipaddr(vm_host.network.bridges.public.offsets[vm_host.name]) | ansible.utils.ipaddr('address') }}" template: overlay - overlay: "{{ (vm_host.network.bridges.public.overlays.default.prefix | ipaddr(vm_host.network.bridges.public.overlays.default.offsets[inventory_hostname])).split('/')[0] }}" + overlay: "{{ (vm_host.network.bridges.public.overlays.default.prefix | ansible.utils.ipaddr(vm_host.network.bridges.public.overlays.default.offsets[inventory_hostname])).split('/')[0] }}" interfaces: - *_network_primary_ diff --git a/inventory/host_vars/ele-hpws-maxi.yml b/inventory/host_vars/ele-hpws-maxi.yml index 0754c7c4..690adee6 100644 --- a/inventory/host_vars/ele-hpws-maxi.yml +++ b/inventory/host_vars/ele-hpws-maxi.yml @@ -41,12 +41,12 @@ network: domain: "{{ host_domain }}" primary: &_network_primary_ name: eno1 - address: "{{ network_zones.emc.prefix | ipaddr(network_zones.emc.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.emc.prefix | ansible.utils.ipaddr(network_zones.emc.offsets[inventory_hostname]) }}" gateway: "{{ network_zones.emc.gateway }}" interfaces: - *_network_primary_ - name: eno1.18 - address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) }}" apt_repo_components: diff --git a/inventory/host_vars/ele-hpws-mini1.yml b/inventory/host_vars/ele-hpws-mini1.yml index 7c33506f..207414f4 100644 --- a/inventory/host_vars/ele-hpws-mini1.yml +++ b/inventory/host_vars/ele-hpws-mini1.yml @@ -41,12 +41,12 @@ network: domain: "{{ host_domain }}" primary: &_network_primary_ name: eno1 - address: "{{ network_zones.emc.prefix | ipaddr(network_zones.emc.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.emc.prefix | ansible.utils.ipaddr(network_zones.emc.offsets[inventory_hostname]) }}" gateway: "{{ network_zones.emc.gateway }}" interfaces: - *_network_primary_ - name: eno1.18 - address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) }}" apt_repo_components: diff --git a/inventory/host_vars/ele-hpws-mini2.yml b/inventory/host_vars/ele-hpws-mini2.yml index d63dec3e..e8d6bbe2 100644 --- a/inventory/host_vars/ele-hpws-mini2.yml +++ b/inventory/host_vars/ele-hpws-mini2.yml @@ -44,7 +44,7 @@ network: domain: "{{ host_domain }}" primary: &_network_primary_ name: eno1 - address: "{{ network_zones.guest.prefix | ipaddr(network_zones.guest.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.guest.prefix | ansible.utils.ipaddr(network_zones.guest.offsets[inventory_hostname]) }}" gateway: "{{ network_zones.guest.gateway }}" interfaces: - *_network_primary_ diff --git a/inventory/host_vars/ele-laptop.yml b/inventory/host_vars/ele-laptop.yml index 4399127f..add2ff94 100644 --- a/inventory/host_vars/ele-laptop.yml +++ b/inventory/host_vars/ele-laptop.yml @@ -40,7 +40,7 @@ network: domain: "{{ host_domain }}" primary: &_network_primary_ name: enp2s0 - address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) }}" gateway: "{{ network_zones.lan.gateway }}" interfaces: - *_network_primary_ diff --git a/inventory/host_vars/ele-media.yml b/inventory/host_vars/ele-media.yml index 32f52b7f..cdd60e6c 100644 --- a/inventory/host_vars/ele-media.yml +++ b/inventory/host_vars/ele-media.yml @@ -12,7 +12,7 @@ network: domain: "{{ host_domain }}" primary: &_network_primary_ name: eno1 - address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) }}" gateway: "{{ network_zones.lan.gateway }}" interfaces: - *_network_primary_ diff --git a/inventory/host_vars/ele-minidan.yml b/inventory/host_vars/ele-minidan.yml index 73415369..e4a151c3 100644 --- a/inventory/host_vars/ele-minidan.yml +++ b/inventory/host_vars/ele-minidan.yml @@ -43,7 +43,7 @@ network: domain: "{{ host_domain }}" primary: &_network_primary_ name: enp1s0 - address: "{{ network_zones.guest.prefix | ipaddr(network_zones.guest.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.guest.prefix | ansible.utils.ipaddr(network_zones.guest.offsets[inventory_hostname]) }}" gateway: "{{ network_zones.guest.gateway }}" interfaces: - *_network_primary_ diff --git a/inventory/host_vars/ele-mur.yml b/inventory/host_vars/ele-mur.yml index 57d44fff..598f2f8e 100644 --- a/inventory/host_vars/ele-mur.yml +++ b/inventory/host_vars/ele-mur.yml @@ -30,15 +30,15 @@ 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_ - name: funkfeuer0 content: | - address {{ network_zones.murat_transfer.prefix | ipaddr(network_zones.murat_transfer.offsets[inventory_hostname]) | ipaddr('address/prefix') }} - up iptables -t nat -A POSTROUTING -s {{ network_zones.murat_transfer.prefix | ipaddr('network/prefix') }} -o primary0 -j SNAT --to {{ vm_host.network.bridges.public.prefix | ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address') }} + address {{ network_zones.murat_transfer.prefix | ansible.utils.ipaddr(network_zones.murat_transfer.offsets[inventory_hostname]) }} + up iptables -t nat -A POSTROUTING -s {{ network_zones.murat_transfer.prefix }} -o primary0 -j SNAT --to {{ vm_host.network.bridges.public.prefix | ansible.utils.ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }} up sysctl net.ipv4.ip_forward=1 - down iptables -t nat -D POSTROUTING -s {{ network_zones.murat_transfer.prefix | ipaddr('network/prefix') }} -o primary0 -j SNAT --to {{ vm_host.network.bridges.public.prefix | ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address') }} + down iptables -t nat -D POSTROUTING -s {{ network_zones.murat_transfer.prefix }} -o primary0 -j SNAT --to {{ vm_host.network.bridges.public.prefix | ansible.utils.ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }} diff --git a/inventory/host_vars/ele-orpheum.yml b/inventory/host_vars/ele-orpheum.yml index 9c4a02df..e9c3a927 100644 --- a/inventory/host_vars/ele-orpheum.yml +++ b/inventory/host_vars/ele-orpheum.yml @@ -93,7 +93,7 @@ openwrt_uci: options: device: eth2 proto: static - ipaddr: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}" - netmask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" + ipaddr: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}" + netmask: "{{ network_zones.lan.prefix | ansible.utils.ipaddr('netmask') }}" gateway: "{{ network_zones.lan.gateway }}" dns: "{{ network_zones.lan.dns }}" diff --git a/inventory/host_vars/ele-tsdatacop.yml b/inventory/host_vars/ele-tsdatacop.yml index 3aa24e8a..6df46a93 100644 --- a/inventory/host_vars/ele-tsdatacop.yml +++ b/inventory/host_vars/ele-tsdatacop.yml @@ -41,12 +41,12 @@ network: domain: "{{ host_domain }}" primary: &_network_primary_ name: eno1 - address: "{{ network_zones.emc.prefix | ipaddr(network_zones.emc.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.emc.prefix | ansible.utils.ipaddr(network_zones.emc.offsets[inventory_hostname]) }}" gateway: "{{ network_zones.emc.gateway }}" interfaces: - *_network_primary_ - name: enp6s0f0 - address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) }}" apt_repo_components: diff --git a/inventory/host_vars/ele-uhrturm.yml b/inventory/host_vars/ele-uhrturm.yml index 6ea67363..1ddb08fe 100644 --- a/inventory/host_vars/ele-uhrturm.yml +++ b/inventory/host_vars/ele-uhrturm.yml @@ -8,7 +8,7 @@ network: domain: "{{ host_domain }}" primary: &_network_primary_ name: eno1 - address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) }}" gateway: "{{ network_zones.lan.gateway }}" interfaces: - *_network_primary_ diff --git a/inventory/host_vars/r3-vex2.yml b/inventory/host_vars/r3-vex2.yml index 5fb5f10f..48ea0e7a 100644 --- a/inventory/host_vars/r3-vex2.yml +++ b/inventory/host_vars/r3-vex2.yml @@ -23,9 +23,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_ -- cgit v1.2.3