diff options
author | Christian Pointner <equinox@spreadspace.org> | 2020-07-08 03:16:17 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2020-07-11 02:29:02 +0200 |
commit | cb006428feac7f330fee3098dbf749aec6ebf585 (patch) | |
tree | eafe7a9dfb42484958688b04df9639b3f6fd8661 /inventory | |
parent | refactor vm role names (diff) |
vm/host/network: config initial setup works now
Diffstat (limited to 'inventory')
-rw-r--r-- | inventory/group_vars/vmhost-ch-oulu/main.yml | 21 | ||||
-rw-r--r-- | inventory/host_vars/ch-oulu.yml | 16 | ||||
-rw-r--r-- | inventory/hosts.ini | 9 |
3 files changed, 46 insertions, 0 deletions
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 |