From 7a0c203380731eaaae03fca8de71cdf9094b0120 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 21 Jun 2020 20:21:14 +0200 Subject: address vs prefix --- inventory/host_vars/ch-hroottest-obsd.yml | 9 +++++---- inventory/host_vars/ch-hroottest-vm1.yml | 9 +++++---- inventory/host_vars/ch-testvm.yml | 4 ++-- 3 files changed, 12 insertions(+), 10 deletions(-) (limited to 'inventory') diff --git a/inventory/host_vars/ch-hroottest-obsd.yml b/inventory/host_vars/ch-hroottest-obsd.yml index 61476370..c1007c8a 100644 --- a/inventory/host_vars/ch-hroottest-obsd.yml +++ b/inventory/host_vars/ch-hroottest-obsd.yml @@ -21,8 +21,9 @@ install: network: nameservers: "{{ hostvars[_vm_host_].vm_host.network.dns }}" domain: "{{ host_domain }}" - primary: - interface: vio0 - ip: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.prefix | ipaddr(hostvars[_vm_host_].vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address') }}" - mask: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.prefix | ipaddr('netmask') }}" + primary: &_network_primary_ + name: vio0 + address: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.prefix | ipaddr(hostvars[_vm_host_].vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" gateway: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.prefix | ipaddr('address') }}" + interfaces: + - *_network_primary_ diff --git a/inventory/host_vars/ch-hroottest-vm1.yml b/inventory/host_vars/ch-hroottest-vm1.yml index 39a2457c..9e7688fc 100644 --- a/inventory/host_vars/ch-hroottest-vm1.yml +++ b/inventory/host_vars/ch-hroottest-vm1.yml @@ -32,8 +32,9 @@ network: domain: "{{ host_domain }}" systemd_link: interfaces: "{{ install.interfaces }}" - primary: - interface: primary0 - ip: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.prefix | ipaddr(hostvars[_vm_host_].vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address') }}" - mask: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.prefix | ipaddr('netmask') }}" + primary: &_network_primary_ + name: primary0 + address: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.prefix | ipaddr(hostvars[_vm_host_].vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" gateway: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.prefix | ipaddr('address') }}" + interfaces: + - *_network_primary_ diff --git a/inventory/host_vars/ch-testvm.yml b/inventory/host_vars/ch-testvm.yml index ebe758ab..d1bdb64e 100644 --- a/inventory/host_vars/ch-testvm.yml +++ b/inventory/host_vars/ch-testvm.yml @@ -29,9 +29,9 @@ network: interfaces: "{{ install.interfaces }}" primary: &_network_primary_ name: primary0 - prefix: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.prefix | ipaddr(hostvars[_vm_host_].vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.prefix | ipaddr(hostvars[_vm_host_].vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" gateway: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.gateway }}" - prefix6: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.prefix6 | ipaddr(hostvars[_vm_host_].vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + address6: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.prefix6 | ipaddr(hostvars[_vm_host_].vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" gateway6: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.gateway6 }}" interfaces: - *_network_primary_ -- cgit v1.2.3