From b13af9ddfd01117b350243dd1cc483a35a420611 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 22 Jun 2020 01:12:15 +0200 Subject: all vm hosts/guests use the new network config schema --- inventory/host_vars/ch-k8s-w1.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'inventory/host_vars/ch-k8s-w1.yml') diff --git a/inventory/host_vars/ch-k8s-w1.yml b/inventory/host_vars/ch-k8s-w1.yml index 5cf6d444..979efc24 100644 --- a/inventory/host_vars/ch-k8s-w1.yml +++ b/inventory/host_vars/ch-k8s-w1.yml @@ -1,9 +1,6 @@ --- -_vm_host_: ch-hroottest - install: vm: - host: "{{ _vm_host_ }}" mem: 4096 numcpu: 4 autostart: True @@ -21,15 +18,17 @@ install: name: primary0 network: - nameservers: "{{ hostvars[_vm_host_].vm_host.network.dns }}" + nameservers: "{{ vm_host.network.dns }}" 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') }}" - gateway: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.prefix | ipaddr('address') }}" + 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') }}" + interfaces: + - *_network_primary_ + docker_lvm: vg: "{{ host_name }}" -- cgit v1.2.3