From cb006428feac7f330fee3098dbf749aec6ebf585 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 8 Jul 2020 03:16:17 +0200 Subject: vm/host/network: config initial setup works now --- inventory/group_vars/vmhost-ch-oulu/main.yml | 21 +++++++++++++++++++++ inventory/host_vars/ch-oulu.yml | 16 ++++++++++++++++ inventory/hosts.ini | 9 +++++++++ 3 files changed, 46 insertions(+) create mode 100644 inventory/group_vars/vmhost-ch-oulu/main.yml (limited to 'inventory') diff --git a/inventory/group_vars/vmhost-ch-oulu/main.yml b/inventory/group_vars/vmhost-ch-oulu/main.yml new file mode 100644 index 00000000..db5daa9c --- /dev/null +++ b/inventory/group_vars/vmhost-ch-oulu/main.yml @@ -0,0 +1,21 @@ +--- +__vmhost_bridge_interface_zones__: + bond0: + - lan + - svc + - mgmt + +__vmhost_bridge_interface_zones_yaml__: | + {% for interface in (__vmhost_bridge_interface_zones__.keys() | sort) %} + {% for zone in __vmhost_bridge_interface_zones__[interface] %} + {{ zone }}: + interfaces: + - {{ interface }}.{{ network_zones[zone].vlan }} + {% endfor %} + {% endfor %} + + +vm_host: + name: ch-oulu + network: + bridges: "{{ __vmhost_bridge_interface_zones_yaml__ | from_yaml }}" diff --git a/inventory/host_vars/ch-oulu.yml b/inventory/host_vars/ch-oulu.yml index 1e43f21d..e9113e7e 100644 --- a/inventory/host_vars/ch-oulu.yml +++ b/inventory/host_vars/ch-oulu.yml @@ -23,3 +23,19 @@ network: gateway: "{{ network_zones.lan.gateway }}" interfaces: - *_network_primary_ + bonds: + - name: bond0 + mode: 802.3ad + slaves: + - eno1 + - eno2 + options: + miimon: 100 + vlans: + bond0: "{{ __vmhost_bridge_interface_zones__['bond0'] | map('extract', network_zones) | map(attribute='vlan') | list }}" + + +apt_repo_components: + - main + - contrib + - non-free ## for microcode updates diff --git a/inventory/hosts.ini b/inventory/hosts.ini index 5d19bee4..549e494b 100644 --- a/inventory/hosts.ini +++ b/inventory/hosts.ini @@ -231,6 +231,13 @@ ch-atlas [vmhost-ch-atlas:children] vmhost-ch-atlas-guests +[vmhost-ch-oulu-guests] +ch-oulu-vm1 +[vmhost-ch-oulu] +ch-oulu +[vmhost-ch-oulu:children] +vmhost-ch-oulu-guests + [vmhost-sk-2019vm-guests] sk-testvm sk-torrent @@ -255,12 +262,14 @@ vmhost-sk-tomnext-guests [kvmhosts] ch-gnocchi ch-atlas +ch-oulu sk-2019vm sk-tomnext [kvmguests:children] vmhost-ch-gnocchi-guests vmhost-ch-atlas-guests +vmhost-ch-oulu-guests vmhost-sk-2019vm-guests vmhost-sk-tomnext-guests -- cgit v1.2.3