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 +++++++++++++++++++---------------- 2 files changed, 60 insertions(+), 19 deletions(-) create mode 100644 inventory/host_vars/sk-tomnext-nc.yml (limited to 'inventory/host_vars') 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 -- cgit v1.2.3