From 7783703ff07eb90fea5a1251032dc2901602219d Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 23 May 2020 05:40:09 +0200 Subject: major revamp for zfs based vm images --- inventory/host_vars/sk-tomnext-nc.yml | 36 +++++++++++++++++++++++++++++ inventory/host_vars/sk-tomnext.yml | 43 +++++++++++++++++++---------------- inventory/hosts.ini | 5 +++- 3 files changed, 64 insertions(+), 20 deletions(-) create mode 100644 inventory/host_vars/sk-tomnext-nc.yml (limited to 'inventory') diff --git a/inventory/host_vars/sk-tomnext-nc.yml b/inventory/host_vars/sk-tomnext-nc.yml new file mode 100644 index 00000000..a302a298 --- /dev/null +++ b/inventory/host_vars/sk-tomnext-nc.yml @@ -0,0 +1,36 @@ +--- +vm_host: sk-tomnext + +install: + host: "{{ vm_host }}" + mem: 16384 + numcpu: 8 + disks: + primary: /dev/sda + scsi: + sda: + type: zfs + name: root + size: 50g + sdb: + type: zfs + name: data + size: 20g + interfaces: + - bridge: br-public + name: primary0 + autostart: False + +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.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] }}" + +external_ip: "{{ network.primary.overlay }}" diff --git a/inventory/host_vars/sk-tomnext.yml b/inventory/host_vars/sk-tomnext.yml index d570f1b2..57f3dcf1 100644 --- a/inventory/host_vars/sk-tomnext.yml +++ b/inventory/host_vars/sk-tomnext.yml @@ -11,25 +11,6 @@ network: {} base_intel_nic_stability_fix: true -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 - ssh_keys_root: "{{ ssh_keys.equinox[env_group] + ssh_keys.dan }}" apt_repo_components: @@ -65,3 +46,27 @@ 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: + 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 diff --git a/inventory/hosts.ini b/inventory/hosts.ini index 6f7d7a72..02d900e2 100644 --- a/inventory/hosts.ini +++ b/inventory/hosts.ini @@ -129,6 +129,8 @@ sk-2019 host_name=2019 sk-cloudia host_name=cloudia sk-2019vm host_name=2019vm sk-tomnext host_name=tomnext +sk-tomnext-nc host_name=tomnext-nc +sk-tomnext-hp sk-testvm host_name=testvm sk-torrent host_name=torrent @@ -250,7 +252,8 @@ sk-torrent ch-mimas ele-gwhetzner ele-mur - +sk-tomnext-nc +sk-tomnext-hp [hroot] sk-2019 -- cgit v1.2.3