diff options
author | Christian Pointner <equinox@spreadspace.org> | 2020-06-22 02:37:11 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2020-06-22 02:37:11 +0200 |
commit | 5a35c210ddb64998586b69b921e8d721395f09d5 (patch) | |
tree | 9a65e26f147c59ab379e1cd23a1baf60ac5d5264 /inventory | |
parent | Merge branch 'topic/kubernetes-network-plugins' (diff) | |
parent | converted other physical machines to new network config (diff) |
Merge branch 'topic/network-interfaces-variables-refactoring'
Diffstat (limited to 'inventory')
55 files changed, 487 insertions, 732 deletions
diff --git a/inventory/group_vars/all/users.yml b/inventory/group_vars/all/users.yml index d4ec2b5f..bc63cb24 100644 --- a/inventory/group_vars/all/users.yml +++ b/inventory/group_vars/all/users.yml @@ -19,6 +19,10 @@ users: ssh: - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMd1se9DUnMWXjF4a770J4rl6L9zFmNKc7TzN0hsapUS bene@klapprechner + antares: + ssh: + - "# TODO: add me" + ssh_key_map: diff --git a/inventory/group_vars/r3-cccamp19/network.yml b/inventory/group_vars/r3-cccamp19/network.yml deleted file mode 100644 index 82216ea6..00000000 --- a/inventory/group_vars/r3-cccamp19/network.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -network_zones: - camp19: - vlan: 19 - - lan: - vlan: 126 - prefix: 192.168.126.0/24 - gateway: 192.168.126.254 - dns: - - 192.168.126.254 - dhcp: - start: 1 - limit: 199 - offsets: - r3-cccamp19-dione: 200 - r3-cccamp19-helene: 201 - r3-cccamp19-flora: 220 - r3-cccamp19-verr: 221 - r3-cccamp19-feedcode: 222 - r3-cccamp19-av: 223 - r3-cccamp19-gw: 254 - - mgmt: - vlan: 41 - prefix: 192.168.41.0/24 - offsets: - r3-cccamp19-dione: 100 - r3-cccamp19-helene: 101 - r3-cccamp19-sw0: 200 - r3-cccamp19-sw1: 201 - r3-cccamp19-sw2: 202 - r3-cccamp19-gw: 254 diff --git a/inventory/group_vars/vmhost-ch-atlas/main.yml b/inventory/group_vars/vmhost-ch-atlas/main.yml new file mode 100644 index 00000000..4b7af32f --- /dev/null +++ b/inventory/group_vars/vmhost-ch-atlas/main.yml @@ -0,0 +1,25 @@ +--- +vm_host: + name: ch-atlas + network: + dns: + - 89.106.208.7 + - 89.106.208.12 + bridges: + public: + interfaces: + - eth0 + prefix: 89.106.215.16/28 + gateway: 89.106.215.30 + prefix6: 2a02:3e0:407::/64 + gateway6: 2a02:3e0:407::1 + offsets: + ch-keyserver: 3 + ch-testvm: 4 + ele-mur: 5 + r3-vex2: 11 + ch-atlas: 13 + k8stest: {} + funkfeuer: + interfaces: + - eth0.502 diff --git a/inventory/group_vars/vmhost-ch-gnocchi/main.yml b/inventory/group_vars/vmhost-ch-gnocchi/main.yml new file mode 100644 index 00000000..5b36795e --- /dev/null +++ b/inventory/group_vars/vmhost-ch-gnocchi/main.yml @@ -0,0 +1,25 @@ +--- +__vmhost_bridge_interface_zones__: + enp1s0: + - lan + - svc + enp2s0: + - magenta + enp3s0: + - mgmt + - iot + +__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-gnocchi + network: + bridges: "{{ __vmhost_bridge_interface_zones_yaml__ | from_yaml }}" diff --git a/inventory/group_vars/vmhost-ch-hroottest/main.yml b/inventory/group_vars/vmhost-ch-hroottest/main.yml new file mode 100644 index 00000000..84c826b1 --- /dev/null +++ b/inventory/group_vars/vmhost-ch-hroottest/main.yml @@ -0,0 +1,25 @@ +--- +vm_host: + name: ch-hroottest + network: + dns: + - 213.133.100.100 + - 213.133.98.98 + - 213.133.99.99 + bridges: + public: + prefix: 192.168.250.0/24 + offsets: + ch-hroottest-vm1: 100 + ch-hroottest-obsd: 101 + ch-k8s-m2: 200 + ch-k8s-w0: 210 + ch-k8s-w1: 211 + ch-hroottest: 254 + nat: yes + zfs: + default: + pool: storage + name: vm + properties: + compression: lz4 diff --git a/inventory/group_vars/vmhost-sk-2019vm/main.yml b/inventory/group_vars/vmhost-sk-2019vm/main.yml new file mode 100644 index 00000000..93f7948c --- /dev/null +++ b/inventory/group_vars/vmhost-sk-2019vm/main.yml @@ -0,0 +1,39 @@ +--- +vm_host: + name: sk-2019vm + network: + dns: + - 213.133.100.100 + - 213.133.98.98 + - 213.133.99.99 + bridges: + public: + prefix: 192.168.250.0/24 + offsets: + sk-torrent: 136 +# emc-master: 137 + lw-master: 137 + ele-gwhetzner: 138 + ch-k8s-m0: 139 + ch-k8s-m1: 140 + ch-mimas: 142 + sk-testvm: 253 + sk-2019vm: 254 + nat: yes + overlay: + prefix: 178.63.180.136/29 + offsets: + sk-torrent: 0 +# emc-master: 1 + lw-master: 1 + ele-gwhetzner: 2 + ch-k8s-m0: 3 + ch-k8s-m1: 4 + ch-mimas: 6 + sk-testvm: 7 + zfs: + default: + pool: storage + name: vm + properties: + compression: lz4 diff --git a/inventory/group_vars/vmhost-sk-tomnext/main.yml b/inventory/group_vars/vmhost-sk-tomnext/main.yml new file mode 100644 index 00000000..eacc58a2 --- /dev/null +++ b/inventory/group_vars/vmhost-sk-tomnext/main.yml @@ -0,0 +1,27 @@ +--- +vm_host: + name: sk-tomnext + network: + dns: + - 213.133.100.100 + - 213.133.98.98 + - 213.133.99.99 + bridges: + public: + prefix: 192.168.250.0/24 + offsets: + sk-tomnext-nc: 103 + sk-tomnext-hp: 104 + sk-tomnext: 254 + nat: yes + overlay: + prefix: 94.130.206.64/26 + offsets: + sk-tomnext-nc: 39 + sk-tomnext-hp: 40 + zfs: + default: + pool: storage + name: vm + properties: + compression: lz4 diff --git a/inventory/host_vars/ch-atlas.yml b/inventory/host_vars/ch-atlas.yml index ea8ba310..aa2c2e0c 100644 --- a/inventory/host_vars/ch-atlas.yml +++ b/inventory/host_vars/ch-atlas.yml @@ -1,23 +1,11 @@ --- -vm_host: - network: - dns: - - 89.106.208.7 - - 89.106.208.12 - bridges: - public: - interfaces: - - eth0 - prefix: 89.106.215.29/28 - gateway: 89.106.215.30 - prefix6: 2a02:3e0:407::29/64 - gateway6: 2a02:3e0:407::1 - offsets: - ch-keyserver: 3 - ch-testvm: 4 - ele-mur: 5 - r3-vex2: 11 - k8stest: {} - funkfeuer: - interfaces: - - eth0.502 +network: + nameservers: "{{ vm_host.network.dns }}" + domain: "{{ host_domain }}" + interfaces: + - name: br-public + 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.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') }}" + gateway6: "{{ vm_host.network.bridges.public.gateway6 }}" diff --git a/inventory/host_vars/ch-equinox-ws.yml b/inventory/host_vars/ch-equinox-ws.yml index d4ff7afa..6d454f57 100644 --- a/inventory/host_vars/ch-equinox-ws.yml +++ b/inventory/host_vars/ch-equinox-ws.yml @@ -9,11 +9,12 @@ install: network: nameservers: "{{ network_zones.lan.dns }}" domain: "{{ host_domain }}" - primary: - interface: enp8s0 - ip: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}" - mask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" + primary: &_network_primary_ + name: enp8s0 + address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" gateway: "{{ network_zones.lan.gateway }}" + interfaces: + - *_network_primary_ base_modules_blacklist: "{{ base_modules_blacklist_none }}" diff --git a/inventory/host_vars/ch-gnocchi.yml b/inventory/host_vars/ch-gnocchi.yml index a6452c12..c52a1cf4 100644 --- a/inventory/host_vars/ch-gnocchi.yml +++ b/inventory/host_vars/ch-gnocchi.yml @@ -9,7 +9,10 @@ install: - console=ttyS0,115200n8 network: - domain: spreadspace.org + domain: "{{ host_domain }}" + interfaces: + - name: br-mgmt + address: "{{ network_zones.mgmt.prefix | ipaddr(network_zones.mgmt.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" apt_repo_components: @@ -23,66 +26,3 @@ installer_lvm: lv: installer size: 10G fs: ext4 - - - -__interface_zones__: - enp1s0: - - lan - - svc - enp2s0: - - magenta - enp3s0: - - name: mgmt - prefix: "{{ network_zones.mgmt.prefix | ipaddr(network_zones.mgmt.offsets[inventory_hostname]) }}" - - iot - - -__interface_zones_yaml__: | - {% for interface in (__interface_zones__.keys() | sort) %} - {% for zone in __interface_zones__[interface] %} - {% if zone is mapping %} - {{ zone.name }}: - interfaces: - - {{ interface }}.{{ network_zones[zone.name].vlan }} - prefix: {{ zone.prefix }} - {% else %} - {{ zone }}: - interfaces: - - {{ interface }}.{{ network_zones[zone].vlan }} - {% endif %} - {% endfor %} - {% endfor %} - - -vm_host: - network: - bridges: "{{ __interface_zones_yaml__ | from_yaml }}" - - -__interface_configs__: | - # This file describes the network interfaces available on your system - # and how to activate them. For more information, see interfaces(5). - - # The loopback network interface - auto lo - iface lo inet loopback - {% for interface in (__interface_zones__.keys() | sort) %} - - - auto {{ interface }} - iface {{ interface }} inet manual - {% for zone in __interface_zones__[interface] %} - - {% if zone is mapping %} - auto {{ interface }}.{{ network_zones[zone.name].vlan }} - iface {{ interface }}.{{ network_zones[zone.name].vlan }} inet manual - {% else %} - auto {{ interface }}.{{ network_zones[zone].vlan }} - iface {{ interface }}.{{ network_zones[zone].vlan }} inet manual - {% endif %} - {% endfor %} - {% endfor %} - - - source /etc/network/interfaces.d/* diff --git a/inventory/host_vars/ch-gw-lan.yml b/inventory/host_vars/ch-gw-lan.yml index 22597138..35f98291 100644 --- a/inventory/host_vars/ch-gw-lan.yml +++ b/inventory/host_vars/ch-gw-lan.yml @@ -1,9 +1,6 @@ --- -_vm_host_: ch-gnocchi - install: vm: - host: "{{ _vm_host_ }}" mem: 512 numcpu: 2 autostart: True @@ -12,7 +9,7 @@ install: scsi: sda: type: lvm - vg: "{{ hostvars[_vm_host_].host_name }}" + vg: "{{ hostvars[vm_host.name].host_name }}" lv: "{{ inventory_hostname }}" size: 10g interfaces: @@ -26,8 +23,11 @@ network: domain: "{{ host_domain }}" systemd_link: interfaces: "{{ install.interfaces }}" - primary: - interface: svc0 - ip: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets[inventory_hostname]) | ipaddr('address') }}" - mask: "{{ network_zones.svc.prefix | ipaddr('netmask') }}" + primary: &_network_primary_ + name: svc0 + address: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" gateway: "{{ network_zones.svc.gateway }}" + interfaces: + - *_network_primary_ + - name: lan0 + address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" diff --git a/inventory/host_vars/ch-hroottest-obsd.yml b/inventory/host_vars/ch-hroottest-obsd.yml index 61476370..f7d5cba7 100644 --- a/inventory/host_vars/ch-hroottest-obsd.yml +++ b/inventory/host_vars/ch-hroottest-obsd.yml @@ -1,9 +1,6 @@ --- -_vm_host_: ch-hroottest - install: vm: - host: "{{ _vm_host_ }}" mem: 1024 numcpu: 1 autostart: True @@ -19,10 +16,11 @@ install: name: vio0 network: - nameservers: "{{ hostvars[_vm_host_].vm_host.network.dns }}" + nameservers: "{{ 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') }}" - gateway: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.prefix | ipaddr('address') }}" + primary: &_network_primary_ + name: vio0 + 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_ diff --git a/inventory/host_vars/ch-hroottest-vm1.yml b/inventory/host_vars/ch-hroottest-vm1.yml index 39a2457c..4f9e7e82 100644 --- a/inventory/host_vars/ch-hroottest-vm1.yml +++ b/inventory/host_vars/ch-hroottest-vm1.yml @@ -1,9 +1,6 @@ --- -_vm_host_: ch-hroottest - install: vm: - host: "{{ _vm_host_ }}" mem: 4096 numcpu: 4 autostart: True @@ -28,12 +25,13 @@ 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_ diff --git a/inventory/host_vars/ch-hroottest.yml b/inventory/host_vars/ch-hroottest.yml index 555791ca..f07198b1 100644 --- a/inventory/host_vars/ch-hroottest.yml +++ b/inventory/host_vars/ch-hroottest.yml @@ -7,7 +7,12 @@ install: layout: sata_raid root_lvm_size: 10G -network: {} +network: + nameservers: "{{ vm_host.network.dns }}" + domain: "{{ host_domain }}" + interfaces: + - name: br-public + address: "{{ vm_host.network.bridges.public.prefix | ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" apt_repo_components: @@ -30,27 +35,3 @@ zfs_sanoid_modules: use_template: production recursive: yes process_children_only: yes - - -vm_host: - network: - dns: - - 213.133.100.100 - - 213.133.98.98 - - 213.133.99.99 - bridges: - public: - prefix: 192.168.250.254/24 - offsets: - ch-hroottest-vm1: 100 - ch-hroottest-obsd: 101 - ch-k8s-m2: 200 - ch-k8s-w0: 210 - ch-k8s-w1: 211 - nat: yes - zfs: - default: - pool: storage - name: vm - properties: - compression: lz4 diff --git a/inventory/host_vars/ch-jump.yml b/inventory/host_vars/ch-jump.yml index 463503cb..954819ba 100644 --- a/inventory/host_vars/ch-jump.yml +++ b/inventory/host_vars/ch-jump.yml @@ -1,9 +1,6 @@ --- -_vm_host_: ch-gnocchi - install: vm: - host: "{{ _vm_host_ }}" mem: 768 numcpu: 2 autostart: True @@ -12,7 +9,7 @@ install: scsi: sda: type: lvm - vg: "{{ hostvars[_vm_host_].host_name }}" + vg: "{{ hostvars[vm_host.name].host_name }}" lv: "{{ inventory_hostname }}" size: 10g interfaces: @@ -26,8 +23,11 @@ network: domain: "{{ host_domain }}" systemd_link: interfaces: "{{ install.interfaces }}" - primary: - interface: svc0 - ip: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets[inventory_hostname]) | ipaddr('address') }}" - mask: "{{ network_zones.svc.prefix | ipaddr('netmask') }}" + primary: &_network_primary_ + name: svc0 + address: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" gateway: "{{ network_zones.svc.gateway }}" + interfaces: + - *_network_primary_ + - name: mgmt0 + address: "{{ network_zones.mgmt.prefix | ipaddr(network_zones.mgmt.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" diff --git a/inventory/host_vars/ch-k8s-m0.yml b/inventory/host_vars/ch-k8s-m0.yml index 30239ab3..dc42824f 100644 --- a/inventory/host_vars/ch-k8s-m0.yml +++ b/inventory/host_vars/ch-k8s-m0.yml @@ -1,9 +1,6 @@ --- -_vm_host_: sk-2019vm - install: vm: - host: "{{ _vm_host_ }}" mem: 4096 numcpu: 2 autostart: True @@ -21,16 +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') }}" - overlay: "{{ (hostvars[_vm_host_].vm_host.network.bridges.public.overlay.prefix | ipaddr(hostvars[_vm_host_].vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + 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') }}" + overlay: "{{ (vm_host.network.bridges.public.overlay.prefix | ipaddr(vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + interfaces: + - *_network_primary_ external_ip: "{{ network.primary.overlay }}" diff --git a/inventory/host_vars/ch-k8s-m1.yml b/inventory/host_vars/ch-k8s-m1.yml index 30239ab3..dc42824f 100644 --- a/inventory/host_vars/ch-k8s-m1.yml +++ b/inventory/host_vars/ch-k8s-m1.yml @@ -1,9 +1,6 @@ --- -_vm_host_: sk-2019vm - install: vm: - host: "{{ _vm_host_ }}" mem: 4096 numcpu: 2 autostart: True @@ -21,16 +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') }}" - overlay: "{{ (hostvars[_vm_host_].vm_host.network.bridges.public.overlay.prefix | ipaddr(hostvars[_vm_host_].vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + 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') }}" + overlay: "{{ (vm_host.network.bridges.public.overlay.prefix | ipaddr(vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + interfaces: + - *_network_primary_ external_ip: "{{ network.primary.overlay }}" diff --git a/inventory/host_vars/ch-k8s-m2.yml b/inventory/host_vars/ch-k8s-m2.yml index a41c97a8..da9fbe18 100644 --- a/inventory/host_vars/ch-k8s-m2.yml +++ b/inventory/host_vars/ch-k8s-m2.yml @@ -1,9 +1,6 @@ --- -_vm_host_: ch-hroottest - install: vm: - host: "{{ _vm_host_ }}" mem: 4096 numcpu: 2 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 }}" diff --git a/inventory/host_vars/ch-k8s-w0.yml b/inventory/host_vars/ch-k8s-w0.yml index 5cf6d444..979efc24 100644 --- a/inventory/host_vars/ch-k8s-w0.yml +++ b/inventory/host_vars/ch-k8s-w0.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 }}" 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 }}" diff --git a/inventory/host_vars/ch-keyserver.yml b/inventory/host_vars/ch-keyserver.yml index 851116a5..60ab034b 100644 --- a/inventory/host_vars/ch-keyserver.yml +++ b/inventory/host_vars/ch-keyserver.yml @@ -1,11 +1,8 @@ --- apt_repo_provider: ffgraz -_vm_host_: ch-atlas - install: vm: - host: "{{ _vm_host_ }}" mem: 2048 numcpu: 2 autostart: True @@ -14,22 +11,24 @@ install: scsi: sda: type: lvm - vg: "{{ hostvars[_vm_host_].host_name }}" + vg: "{{ hostvars[vm_host.name].host_name }}" lv: "{{ inventory_hostname }}" size: 10g interfaces: - bridge: br-public name: primary0 + mac: 52:54:00:f9:e6:7f network: nameservers: "{{ hostvars[_vm_host_].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.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') }}" - gateway6: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.gateway6 }}" + 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.gateway }}" + address6: "{{ vm_host.network.bridges.public.prefix6 | ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + gateway6: "{{ vm_host.network.bridges.public.gateway6 }}" + interfaces: + - *_network_primary_ diff --git a/inventory/host_vars/ch-mimas.yml b/inventory/host_vars/ch-mimas.yml index c0991944..dfec3866 100644 --- a/inventory/host_vars/ch-mimas.yml +++ b/inventory/host_vars/ch-mimas.yml @@ -1,9 +1,6 @@ --- -_vm_host_: sk-2019vm - install: vm: - host: "{{ _vm_host_ }}" mem: 2048 numcpu: 4 autostart: True @@ -19,15 +16,16 @@ install: name: eth0 network: - nameservers: "{{ hostvars[_vm_host_].vm_host.network.dns }}" + nameservers: "{{ vm_host.network.dns }}" domain: "{{ host_domain }}" systemd_link: interfaces: "{{ install.interfaces }}" - primary: - interface: eth0 - 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') }}" - overlay: "{{ (hostvars[_vm_host_].vm_host.network.bridges.public.overlay.prefix | ipaddr(hostvars[_vm_host_].vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + 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') }}" + overlay: "{{ (vm_host.network.bridges.public.overlay.prefix | ipaddr(vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + interfaces: + - *_network_primary_ external_ip: "{{ network.primary.overlay }}" diff --git a/inventory/host_vars/ch-router-obsd.yml b/inventory/host_vars/ch-router-obsd.yml index 412482de..71137da1 100644 --- a/inventory/host_vars/ch-router-obsd.yml +++ b/inventory/host_vars/ch-router-obsd.yml @@ -1,9 +1,6 @@ --- -_vm_host_: ch-gnocchi - install: vm: - host: "{{ _vm_host_ }}" mem: 512 numcpu: 1 autostart: True @@ -12,7 +9,7 @@ install: virtio: vda: type: lvm - vg: "{{ hostvars[_vm_host_].host_name }}" + vg: "{{ hostvars[vm_host.name].host_name }}" lv: "{{ inventory_hostname }}" size: 10g interfaces: @@ -22,8 +19,9 @@ install: network: nameservers: "{{ network_zones.svc.dns }}" domain: "{{ host_domain }}" - primary: - interface: vio0 - ip: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets[inventory_hostname]) | ipaddr('address') }}" - mask: "{{ network_zones.svc.prefix | ipaddr('netmask') }}" + primary: &_network_primary_ + name: vio0 + address: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" gateway: "{{ network_zones.svc.gateway }}" + interfaces: + - *_network_primary_ diff --git a/inventory/host_vars/ch-testvm.yml b/inventory/host_vars/ch-testvm.yml index 24455db5..5b5e465e 100644 --- a/inventory/host_vars/ch-testvm.yml +++ b/inventory/host_vars/ch-testvm.yml @@ -1,11 +1,8 @@ --- apt_repo_provider: ffgraz -_vm_host_: ch-atlas - install: vm: - host: "{{ _vm_host_ }}" mem: 1024 numcpu: 1 autostart: False @@ -14,7 +11,7 @@ install: scsi: sda: type: lvm - vg: "{{ hostvars[_vm_host_].host_name }}" + vg: "{{ hostvars[vm_host.name].host_name }}" lv: "{{ inventory_hostname }}" size: 5g interfaces: @@ -23,14 +20,15 @@ install: mac: 52:54:00:42:e6:df 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.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') }}" - gateway6: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.gateway6 }}" + 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.gateway }}" + address6: "{{ vm_host.network.bridges.public.prefix6 | ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + gateway6: "{{ vm_host.network.bridges.public.gateway6 }}" + interfaces: + - *_network_primary_ diff --git a/inventory/host_vars/ele-calypso.yml b/inventory/host_vars/ele-calypso.yml index 7ffdd701..865bcebb 100644 --- a/inventory/host_vars/ele-calypso.yml +++ b/inventory/host_vars/ele-calypso.yml @@ -6,8 +6,9 @@ install: {} network: nameservers: "{{ network_zones.lan.dns }}" domain: "{{ host_domain }}" - primary: - interface: eno1 - ip: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}" - mask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" + primary: &_network_primary_ + name: eno1 + address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" gateway: "{{ network_zones.lan.gateway }}" + interfaces: + - *_network_primary_ diff --git a/inventory/host_vars/ele-dione.yml b/inventory/host_vars/ele-dione.yml index 368ac94a..233fc9e8 100644 --- a/inventory/host_vars/ele-dione.yml +++ b/inventory/host_vars/ele-dione.yml @@ -10,11 +10,12 @@ install: network: nameservers: "{{ network_zones.lan.dns }}" domain: spreadspace.org - primary: - interface: eno1 - ip: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}" - mask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" + primary: &_network_primary_ + name: eno1 + address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" gateway: "{{ network_zones.lan.gateway }}" + interfaces: + - *_network_primary_ base_packages_extra_host: - exfat-fuse diff --git a/inventory/host_vars/ele-gwhetzner.yml b/inventory/host_vars/ele-gwhetzner.yml index 2519ab94..d349ddcc 100644 --- a/inventory/host_vars/ele-gwhetzner.yml +++ b/inventory/host_vars/ele-gwhetzner.yml @@ -1,9 +1,6 @@ --- -_vm_host_: sk-2019vm - install: vm: - host: "{{ _vm_host_ }}" mem: 1024 numcpu: 1 autostart: False @@ -19,16 +16,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') }}" - overlay: "{{ (hostvars[_vm_host_].vm_host.network.bridges.public.overlay.prefix | ipaddr(hostvars[_vm_host_].vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + 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') }}" + overlay: "{{ (vm_host.network.bridges.public.overlay.prefix | ipaddr(vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + interfaces: + - *_network_primary_ external_ip: "{{ network.primary.overlay }}" @@ -48,7 +46,7 @@ wireguard_gateway_tunnels: addresses: - 192.168.254.1/30 ip_snat: - interface: "{{ network.primary.interface }}" + interface: "{{ network.primary.name }}" to: "{{ network.primary.overlay }}" port_forwardings: - dest: "{{ network.primary.overlay }}" @@ -67,7 +65,7 @@ wireguard_gateway_tunnels: addresses: - 192.168.254.5/30 ip_snat: - interface: "{{ network.primary.interface }}" + interface: "{{ network.primary.name }}" to: "{{ network.primary.overlay }}" port_forwardings: - dest: "{{ network.primary.overlay }}" diff --git a/inventory/host_vars/ele-helene.yml b/inventory/host_vars/ele-helene.yml index b5b74ff2..a28eccf2 100644 --- a/inventory/host_vars/ele-helene.yml +++ b/inventory/host_vars/ele-helene.yml @@ -10,11 +10,12 @@ install: network: nameservers: "{{ network_zones.lan.dns }}" domain: spreadspace.org - primary: - interface: eno1 - ip: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}" - mask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" + primary: &_network_primary_ + name: eno1 + address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" gateway: "{{ network_zones.lan.gateway }}" + interfaces: + - *_network_primary_ base_packages_extra_host: - exfat-fuse diff --git a/inventory/host_vars/ele-media.yml b/inventory/host_vars/ele-media.yml index bf638639..b61ef79e 100644 --- a/inventory/host_vars/ele-media.yml +++ b/inventory/host_vars/ele-media.yml @@ -6,11 +6,12 @@ install: network: nameservers: "{{ network_zones.lan.dns }}" domain: "{{ host_domain }}" - primary: - interface: eno1 - ip: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}" - mask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" + primary: &_network_primary_ + name: eno1 + address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" gateway: "{{ network_zones.lan.gateway }}" + interfaces: + - *_network_primary_ network_setup: elevate-festival diff --git a/inventory/host_vars/ele-mur.yml b/inventory/host_vars/ele-mur.yml index 88e3b0ed..b7d4d38e 100644 --- a/inventory/host_vars/ele-mur.yml +++ b/inventory/host_vars/ele-mur.yml @@ -5,11 +5,8 @@ ssh_users_root: apt_repo_provider: ffgraz -_vm_host_: ch-atlas - install: vm: - host: "{{ _vm_host_ }}" mem: 1024 numcpu: 1 autostart: False @@ -18,7 +15,7 @@ install: scsi: sda: type: lvm - vg: "{{ hostvars[_vm_host_].host_name }}" + vg: "{{ hostvars[vm_host.name].host_name }}" lv: "{{ inventory_hostname }}" size: 5g interfaces: @@ -30,14 +27,15 @@ install: mac: 52:54:00:37:fd:8b 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.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') }}" - gateway6: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.gateway6 }}" + 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.gateway }}" + address6: "{{ vm_host.network.bridges.public.prefix6 | ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + gateway6: "{{ vm_host.network.bridges.public.gateway6 }}" + interfaces: + - *_network_primary_ diff --git a/inventory/host_vars/ele-telesto.yml b/inventory/host_vars/ele-telesto.yml index 7ac794a5..a8b2b162 100644 --- a/inventory/host_vars/ele-telesto.yml +++ b/inventory/host_vars/ele-telesto.yml @@ -8,11 +8,12 @@ install: {} network: nameservers: "{{ network_zones.lan.dns }}" domain: "{{ host_domain }}" - primary: - interface: eno1 - ip: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}" - mask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" + primary: &_network_primary_ + name: eno1 + address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" gateway: "{{ network_zones.lan.gateway }}" + interfaces: + - *_network_primary_ admin_users_host: - equinox diff --git a/inventory/host_vars/ele-thetys.yml b/inventory/host_vars/ele-thetys.yml index 5748333f..2d6bee1d 100644 --- a/inventory/host_vars/ele-thetys.yml +++ b/inventory/host_vars/ele-thetys.yml @@ -9,11 +9,12 @@ install: network: nameservers: "{{ network_zones.lan.dns }}" domain: "{{ host_domain }}" - primary: - interface: eno1 - ip: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}" - mask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" + primary: &_network_primary_ + name: eno1 + address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" gateway: "{{ network_zones.lan.gateway }}" + interfaces: + - *_network_primary_ admin_users_host: - equinox diff --git a/inventory/host_vars/ele-uhrturm.yml b/inventory/host_vars/ele-uhrturm.yml index ad0056b0..71c312cc 100644 --- a/inventory/host_vars/ele-uhrturm.yml +++ b/inventory/host_vars/ele-uhrturm.yml @@ -6,11 +6,12 @@ install: network: nameservers: "{{ network_zones.lan.dns }}" domain: "{{ host_domain }}" - primary: - interface: eno1 - ip: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}" - mask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" + primary: &_network_primary_ + name: eno1 + address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" gateway: "{{ network_zones.lan.gateway }}" + interfaces: + - *_network_primary_ ssh_users_root: - equinox diff --git a/inventory/host_vars/emc-master.yml b/inventory/host_vars/emc-master.yml index b2050fde..8005b9d9 100644 --- a/inventory/host_vars/emc-master.yml +++ b/inventory/host_vars/emc-master.yml @@ -1,9 +1,6 @@ --- -_vm_host_: sk-2019vm - install: vm: - host: "{{ _vm_host_ }}" mem: 10240 numcpu: 6 autostart: True @@ -22,16 +19,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') }}" - overlay: "{{ (hostvars[_vm_host_].vm_host.network.bridges.public.overlay.prefix | ipaddr(hostvars[_vm_host_].vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + 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') }}" + overlay: "{{ (vm_host.network.bridges.public.overlay.prefix | ipaddr(vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + interfaces: + - *_network_primary_ external_ip: "{{ network.primary.overlay }}" diff --git a/inventory/host_vars/lw-dione.yml b/inventory/host_vars/lw-dione.yml index 19b44ff4..02738ee6 100644 --- a/inventory/host_vars/lw-dione.yml +++ b/inventory/host_vars/lw-dione.yml @@ -11,11 +11,12 @@ network: nameservers: - 9.9.9.9 domain: "{{ host_domain }}" - primary: - interface: eno1 - ip: 192.168.32.202 - mask: 255.255.255.0 + primary: &_network_primary_ + name: eno1 + address: 192.168.32.202/24 gateway: 192.168.32.254 + interfaces: + - *_network_primary_ base_packages_extra_host: - exfat-fuse diff --git a/inventory/host_vars/lw-helene.yml b/inventory/host_vars/lw-helene.yml index c5a936d5..e7919ac7 100644 --- a/inventory/host_vars/lw-helene.yml +++ b/inventory/host_vars/lw-helene.yml @@ -11,11 +11,12 @@ network: nameservers: - 9.9.9.9 domain: "{{ host_domain }}" - primary: - interface: eno1 - ip: 192.168.32.203 - mask: 255.255.255.0 + primary: &_network_primary_ + name: eno1 + address: 192.168.32.203/24 gateway: 192.168.32.254 + interfaces: + - *_network_primary_ base_packages_extra_host: - exfat-fuse diff --git a/inventory/host_vars/lw-master.yml b/inventory/host_vars/lw-master.yml index b2050fde..8005b9d9 100644 --- a/inventory/host_vars/lw-master.yml +++ b/inventory/host_vars/lw-master.yml @@ -1,9 +1,6 @@ --- -_vm_host_: sk-2019vm - install: vm: - host: "{{ _vm_host_ }}" mem: 10240 numcpu: 6 autostart: True @@ -22,16 +19,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') }}" - overlay: "{{ (hostvars[_vm_host_].vm_host.network.bridges.public.overlay.prefix | ipaddr(hostvars[_vm_host_].vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + 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') }}" + overlay: "{{ (vm_host.network.bridges.public.overlay.prefix | ipaddr(vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + interfaces: + - *_network_primary_ external_ip: "{{ network.primary.overlay }}" diff --git a/inventory/host_vars/lw-telesto.yml b/inventory/host_vars/lw-telesto.yml index f25ad258..4a10338e 100644 --- a/inventory/host_vars/lw-telesto.yml +++ b/inventory/host_vars/lw-telesto.yml @@ -9,11 +9,12 @@ network: nameservers: - 9.9.9.9 domain: "{{ host_domain }}" - primary: - interface: eno1 - ip: 192.168.32.201 - mask: 255.255.255.0 + primary: &_network_primary_ + name: eno1 + address: 192.168.32.201/24 gateway: 192.168.32.254 + interfaces: + - *_network_primary_ admin_users_host: - equinox diff --git a/inventory/host_vars/lw-thetys.yml b/inventory/host_vars/lw-thetys.yml index 75aa41f0..17b057b2 100644 --- a/inventory/host_vars/lw-thetys.yml +++ b/inventory/host_vars/lw-thetys.yml @@ -7,13 +7,15 @@ install: - "consoleblank=0" network: - nameservers: "9.9.9.9" + nameservers: + - 9.9.9.9 domain: "{{ host_domain }}" - primary: - interface: eno1 - ip: "192.168.28.202" - mask: "255.255.255.0" - gateway: "192.168.28.254" + primary: &_network_primary_ + name: eno1 + address: 192.168.28.202/24 + gateway: 192.168.28.254 + interfaces: + - *_network_primary_ admin_users_host: - equinox diff --git a/inventory/host_vars/r3-cccamp19-av.yml b/inventory/host_vars/r3-cccamp19-av.yml deleted file mode 100644 index 40524574..00000000 --- a/inventory/host_vars/r3-cccamp19-av.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -_vm_host_: helene - -install: - vm: - host: "{{ _vm_host_ }}" - mem: 4096 - numcpu: 4 - autostart: True - disks: - primary: /dev/sda - scsi: - sda: - type: lvm - vg: "{{ hostvars[_vm_host_].host_name }}" - lv: "{{ inventory_hostname }}" - size: 10g - interfaces: - - bridge: lan-br - name: lan0 - - bridge: camp19-br - name: camp0 - -network: - nameservers: "{{ network_zones.lan.dns }}" - domain: "{{ host_domain }}" - systemd_link: - interfaces: "{{ install.interfaces }}" - primary: - interface: lan0 - ip: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}" - mask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" - gateway: "{{ network_zones.lan.gateway }}" - -install_playbook: r3-cccamp19_vm - -dyndns: - server: ch-pan diff --git a/inventory/host_vars/r3-cccamp19-dione.yml b/inventory/host_vars/r3-cccamp19-dione.yml deleted file mode 100644 index 47195b1f..00000000 --- a/inventory/host_vars/r3-cccamp19-dione.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -install_interface: eno1 -install_dhcp: true - -install: - efi: true - disks: - primary: /dev/disk/by-id/nvme-SAMSUNG_MZVPW256HEGL-00000_S346NY0HC29501 - -network: - domain: camp.realraum.at - - -base_packages_extra_host: - - vlan - -dyndns: - server: ch-pan diff --git a/inventory/host_vars/r3-cccamp19-feedcode.yml b/inventory/host_vars/r3-cccamp19-feedcode.yml deleted file mode 100644 index 10f78ebc..00000000 --- a/inventory/host_vars/r3-cccamp19-feedcode.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -_vm_host_: helene - -install: - vm: - host: "{{ _vm_host_ }}" - mem: 6144 - numcpu: 4 - autostart: True - disks: - primary: /dev/sda - scsi: - sda: - type: lvm - vg: "{{ hostvars[_vm_host_].host_name }}" - lv: "{{ inventory_hostname }}" - size: 42g - interfaces: - - bridge: lan-br - name: lan0 - - bridge: camp19-br - name: camp0 - -network: - nameservers: "{{ network_zones.lan.dns }}" - domain: "{{ host_domain }}" - systemd_link: - interfaces: "{{ install.interfaces }}" - primary: - interface: lan0 - ip: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}" - mask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" - gateway: "{{ network_zones.lan.gateway }}" diff --git a/inventory/host_vars/r3-cccamp19-flora.yml b/inventory/host_vars/r3-cccamp19-flora.yml deleted file mode 100644 index 40524574..00000000 --- a/inventory/host_vars/r3-cccamp19-flora.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -_vm_host_: helene - -install: - vm: - host: "{{ _vm_host_ }}" - mem: 4096 - numcpu: 4 - autostart: True - disks: - primary: /dev/sda - scsi: - sda: - type: lvm - vg: "{{ hostvars[_vm_host_].host_name }}" - lv: "{{ inventory_hostname }}" - size: 10g - interfaces: - - bridge: lan-br - name: lan0 - - bridge: camp19-br - name: camp0 - -network: - nameservers: "{{ network_zones.lan.dns }}" - domain: "{{ host_domain }}" - systemd_link: - interfaces: "{{ install.interfaces }}" - primary: - interface: lan0 - ip: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}" - mask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" - gateway: "{{ network_zones.lan.gateway }}" - -install_playbook: r3-cccamp19_vm - -dyndns: - server: ch-pan diff --git a/inventory/host_vars/r3-cccamp19-gw.yml b/inventory/host_vars/r3-cccamp19-gw.yml deleted file mode 100644 index c6150b4d..00000000 --- a/inventory/host_vars/r3-cccamp19-gw.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -dyndns: - server: ch-pan diff --git a/inventory/host_vars/r3-cccamp19-helene.yml b/inventory/host_vars/r3-cccamp19-helene.yml deleted file mode 100644 index 104a5eda..00000000 --- a/inventory/host_vars/r3-cccamp19-helene.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -install_interface: eno1 -install_dhcp: true - -install: - efi: true - disks: - primary: /dev/disk/by-id/nvme-SAMSUNG_MZVPW256HEGL-00000_S346NB0J803346 - -network: - domain: camp.realraum.at - - -base_packages_extra_host: - - vlan - -dyndns: - server: ch-pan diff --git a/inventory/host_vars/r3-cccamp19-sw0.yml b/inventory/host_vars/r3-cccamp19-sw0.yml deleted file mode 100644 index 5b01d940..00000000 --- a/inventory/host_vars/r3-cccamp19-sw0.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -switch_mgmt_zone: "{{ network_zones.mgmt }}" -switch_mgmt_interface: "Gi1/0/28" - -switch_vlans: "{{ switch_vlans_yaml | from_yaml }}" -switch_vlans_yaml: | - {% for zone_name in network_zones.keys() %} - - name: "{{ zone_name }}" - id: "{{ network_zones[zone_name].vlan }}" - {% endfor %} - -switch_interfaces: "{{ switch_interfaces_yaml | from_yaml }}" -switch_interfaces_yaml: | - - spec: range Te1/0/1-4 - vlan: {{ network_zones['cccamp19'].vlan }} - - spec: range Gi1/0/5-16 - vlan: {{ network_zones['cccamp19'].vlan }} - - - spec: range Gi1/0/17-24 - vlan: {{ network_zones['protected'].vlan }} - - - spec: range Gi1/0/25-28 - vlan: {{ network_zones['mgmt'].vlan }} diff --git a/inventory/host_vars/r3-cccamp19-verr.yml b/inventory/host_vars/r3-cccamp19-verr.yml deleted file mode 100644 index f4e70d57..00000000 --- a/inventory/host_vars/r3-cccamp19-verr.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -_vm_host_: helene - -install: - vm: - host: "{{ _vm_host_ }}" - mem: 4096 - numcpu: 4 - autostart: True - disks: - primary: /dev/sda - scsi: - sda: - type: lvm - vg: "{{ hostvars[_vm_host_].host_name }}" - lv: "{{ inventory_hostname }}" - size: 20g - interfaces: - - bridge: lan-br - name: lan0 - - bridge: camp19-br - name: camp0 - -network: - nameservers: "{{ network_zones.lan.dns }}" - domain: "{{ host_domain }}" - systemd_link: - interfaces: "{{ install.interfaces }}" - primary: - interface: lan0 - ip: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}" - mask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" - gateway: "{{ network_zones.lan.gateway }}" - -install_playbook: r3-cccamp19_vm - -dyndns: - server: ch-pan diff --git a/inventory/host_vars/r3-vex2.yml b/inventory/host_vars/r3-vex2.yml index d43862e9..d5471743 100644 --- a/inventory/host_vars/r3-vex2.yml +++ b/inventory/host_vars/r3-vex2.yml @@ -1,11 +1,8 @@ --- apt_repo_provider: ffgraz -_vm_host_: ch-atlas - install: vm: - host: "{{ _vm_host_ }}" mem: 2048 numcpu: 2 autostart: True @@ -14,22 +11,24 @@ install: scsi: sda: type: lvm - vg: "{{ hostvars[_vm_host_].host_name }}" + vg: "{{ hostvars[vm_host.name].host_name }}" lv: "{{ inventory_hostname }}" size: 15g interfaces: - bridge: br-public name: primary0 + mac: 52:54:00:f9:e6:6f network: nameservers: "{{ hostvars[_vm_host_].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.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') }}" - gateway6: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.gateway6 }}" + 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.gateway }}" + address6: "{{ vm_host.network.bridges.public.prefix6 | ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" + gateway6: "{{ vm_host.network.bridges.public.gateway6 }}" + interfaces: + - *_network_primary_ diff --git a/inventory/host_vars/sk-2019vm.yml b/inventory/host_vars/sk-2019vm.yml index de162712..0c990b74 100644 --- a/inventory/host_vars/sk-2019vm.yml +++ b/inventory/host_vars/sk-2019vm.yml @@ -7,7 +7,12 @@ install: layout: nvme_raid root_lvm_size: 10G -network: {} +network: + nameservers: "{{ vm_host.network.dns }}" + domain: "{{ host_domain }}" + interfaces: + - name: br-public + address: "{{ vm_host.network.bridges.public.prefix | ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" base_intel_nic_stability_fix: true ssh_users_root: @@ -46,41 +51,3 @@ zfs_sanoid_modules: storage/vm/sk-testvm: use_template: ignore recursive: yes - - -vm_host: - network: - dns: - - 213.133.100.100 - - 213.133.98.98 - - 213.133.99.99 - bridges: - public: - prefix: 192.168.250.254/24 - offsets: - sk-torrent: 136 -# emc-master: 137 - lw-master: 137 - ele-gwhetzner: 138 - ch-k8s-m0: 139 - ch-k8s-m1: 140 - ch-mimas: 142 - sk-testvm: 253 - nat: yes - overlay: - prefix: 178.63.180.136/29 - offsets: - sk-torrent: 0 -# emc-master: 1 - lw-master: 1 - ele-gwhetzner: 2 - ch-k8s-m0: 3 - ch-k8s-m1: 4 - ch-mimas: 6 - sk-testvm: 7 - zfs: - default: - pool: storage - name: vm - properties: - compression: lz4 diff --git a/inventory/host_vars/sk-testvm.yml b/inventory/host_vars/sk-testvm.yml index 4074b049..8e285363 100644 --- a/inventory/host_vars/sk-testvm.yml +++ b/inventory/host_vars/sk-testvm.yml @@ -1,9 +1,6 @@ --- -_vm_host_: sk-2019vm - install: vm: - host: "{{ _vm_host_ }}" mem: 1024 numcpu: 1 autostart: False @@ -19,16 +16,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') }}" - overlay: "{{ (hostvars[_vm_host_].vm_host.network.bridges.public.overlay.prefix | ipaddr(hostvars[_vm_host_].vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + 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') }}" + overlay: "{{ (vm_host.network.bridges.public.overlay.prefix | ipaddr(vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + interfaces: + - *_network_primary_ external_ip: "{{ network.primary.overlay }}" diff --git a/inventory/host_vars/sk-tomnext-hp.yml b/inventory/host_vars/sk-tomnext-hp.yml index 667cb76d..2db59ed3 100644 --- a/inventory/host_vars/sk-tomnext-hp.yml +++ b/inventory/host_vars/sk-tomnext-hp.yml @@ -1,9 +1,11 @@ --- -_vm_host_: sk-tomnext +ssh_users_root: + - equinox + - dan + - antares install: vm: - host: "{{ _vm_host_ }}" mem: 8192 numcpu: 4 autostart: True @@ -13,7 +15,7 @@ install: sda: type: zfs name: root - size: 20g + size: 25g interfaces: - bridge: br-public name: primary0 @@ -21,15 +23,16 @@ install: vm_guest_autologin_on_serial: no 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') }}" - overlay: "{{ (hostvars[_vm_host_].vm_host.network.bridges.public.overlay.prefix | ipaddr(hostvars[_vm_host_].vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + 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') }}" + overlay: "{{ (vm_host.network.bridges.public.overlay.prefix | ipaddr(vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + interfaces: + - *_network_primary_ external_ip: "{{ network.primary.overlay }}" diff --git a/inventory/host_vars/sk-tomnext-nc.yml b/inventory/host_vars/sk-tomnext-nc.yml index 48742dd4..6473b6e1 100644 --- a/inventory/host_vars/sk-tomnext-nc.yml +++ b/inventory/host_vars/sk-tomnext-nc.yml @@ -1,9 +1,6 @@ --- -_vm_host_: sk-tomnext - install: vm: - host: "{{ _vm_host_ }}" mem: 16384 numcpu: 8 autostart: True @@ -25,16 +22,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') }}" - overlay: "{{ (hostvars[_vm_host_].vm_host.network.bridges.public.overlay.prefix | ipaddr(hostvars[_vm_host_].vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + 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') }}" + overlay: "{{ (vm_host.network.bridges.public.overlay.prefix | ipaddr(vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + interfaces: + - *_network_primary_ external_ip: "{{ network.primary.overlay }}" diff --git a/inventory/host_vars/sk-tomnext.yml b/inventory/host_vars/sk-tomnext.yml index 555d2f0a..eca2de34 100644 --- a/inventory/host_vars/sk-tomnext.yml +++ b/inventory/host_vars/sk-tomnext.yml @@ -7,7 +7,12 @@ install: layout: nvme_raid root_lvm_size: 10G -network: {} +network: + nameservers: "{{ vm_host.network.dns }}" + domain: "{{ host_domain }}" + interfaces: + - name: br-public + address: "{{ vm_host.network.bridges.public.prefix | ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address/prefix') }}" base_intel_nic_stability_fix: true ssh_users_root: @@ -46,29 +51,3 @@ zfs_sanoid_modules: storage/vm/sk-tomnext-nc: use_template: ignore recursive: yes - - -vm_host: - network: - dns: - - 213.133.100.100 - - 213.133.98.98 - - 213.133.99.99 - bridges: - public: - prefix: 192.168.250.254/24 - offsets: - sk-tomnext-nc: 103 - sk-tomnext-hp: 104 - nat: yes - overlay: - prefix: 94.130.206.64/26 - offsets: - sk-tomnext-nc: 39 - sk-tomnext-hp: 40 - zfs: - default: - pool: storage - name: vm - properties: - compression: lz4 diff --git a/inventory/host_vars/sk-torrent.yml b/inventory/host_vars/sk-torrent.yml index b5bbb8a2..96ddfc4f 100644 --- a/inventory/host_vars/sk-torrent.yml +++ b/inventory/host_vars/sk-torrent.yml @@ -1,9 +1,6 @@ --- -_vm_host_: sk-2019vm - install: vm: - host: "{{ _vm_host_ }}" mem: 4096 numcpu: 4 autostart: True @@ -23,15 +20,16 @@ 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') }}" - overlay: "{{ (hostvars[_vm_host_].vm_host.network.bridges.public.overlay.prefix | ipaddr(hostvars[_vm_host_].vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + 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') }}" + overlay: "{{ (vm_host.network.bridges.public.overlay.prefix | ipaddr(vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + interfaces: + - *_network_primary_ transmission_rpc_password: "{{ vault_transmission_rpc_password }}" diff --git a/inventory/hosts.ini b/inventory/hosts.ini index 9add78d3..b7b8f5af 100644 --- a/inventory/hosts.ini +++ b/inventory/hosts.ini @@ -70,22 +70,6 @@ ansible_port=22000 [realraum] r3-vex2 host_name=vex2 -[realraum:children] -r3-cccamp19 - -[r3-cccamp19:vars] -host_domain=camp.realraum.at - -[r3-cccamp19] -r3-cccamp19-helene host_name=helene -r3-cccamp19-dione host_name=dione -r3-cccamp19-gw -r3-cccamp19-sw0 ansible_host=192.168.41.200 ansible_port=22 -r3-cccamp19-flora host_name=flora -r3-cccamp19-verr host_name=verr -r3-cccamp19-feedcode host_name=feedcode -r3-cccamp19-av host_name=av - ############################### # environment: spreadspace @@ -225,9 +209,7 @@ emc-0[1:3] ############################### # host categories -[dellos6] -r3-cccamp19-sw0 - +## OS [dellos6:children] chaos-at-home-switches @@ -237,41 +219,75 @@ ch-router-obsd ch-hroottest-obsd -[kvmhosts] -ch-atlas +## virtualization +[vmhost-ch-gnocchi-guests] +ch-router +ch-router-obsd +ch-jump +ch-gw-lan +[vmhost-ch-gnocchi] ch-gnocchi -r3-cccamp19-dione -r3-cccamp19-helene -sk-2019vm -sk-tomnext -ch-hroottest +[vmhost-ch-gnocchi:children] +vmhost-ch-gnocchi-guests -[kvmguests] -emc-master -lw-master -ch-keyserver +[vmhost-ch-atlas-guests] ch-testvm -ch-gw-lan -ch-jump -ch-router -ch-router-obsd +ele-mur r3-vex2 -r3-cccamp19-flora -r3-cccamp19-verr -r3-cccamp19-feedcode -r3-cccamp19-av +ch-keyserver +[vmhost-ch-atlas] +ch-atlas +[vmhost-ch-atlas:children] +vmhost-ch-atlas-guests + +[vmhost-ch-hroottest-guests] +ch-hroottest-vm1 +ch-hroottest-obsd +ch-k8s-m2 +ch-k8s-w[0:1] +[vmhost-ch-hroottest] +ch-hroottest +[vmhost-ch-hroottest:children] +vmhost-ch-hroottest-guests + +[vmhost-sk-2019vm-guests] sk-testvm sk-torrent ch-mimas ele-gwhetzner -ele-mur +ch-k8s-m[0:1] +emc-master +lw-master +[vmhost-sk-2019vm] +sk-2019vm +[vmhost-sk-2019vm:children] +vmhost-sk-2019vm-guests + +[vmhost-sk-tomnext-guests] sk-tomnext-nc sk-tomnext-hp -ch-hroottest-vm1 -ch-hroottest-obsd -ch-k8s-m[0:2] -ch-k8s-w[0:1] +[vmhost-sk-tomnext] +sk-tomnext +[vmhost-sk-tomnext:children] +vmhost-sk-tomnext-guests + +[kvmhosts] +ch-gnocchi +ch-atlas +ch-hroottest +sk-2019vm +sk-tomnext + +[kvmguests:children] +vmhost-ch-gnocchi-guests +vmhost-ch-atlas-guests +vmhost-ch-hroottest-guests +vmhost-sk-2019vm-guests +vmhost-sk-tomnext-guests + + +## hoster [hroot] sk-2019 sk-cloudia @@ -310,7 +326,7 @@ hcloud scaleway-kernel - +## misc [accesspoints:children] ele-ap chaos-at-home-ap @@ -322,8 +338,6 @@ ele-dolmetsch-ctl ele-dolmetsch-raspi - -### Elevate Festival [elevate-festival:children] elevate k8s-emc |