summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2022-01-01 20:19:56 +0100
committerChristian Pointner <equinox@spreadspace.org>2022-01-01 20:19:56 +0100
commitd90144d2190009f8bd121cb8f773a9209500f034 (patch)
tree2d258279d2179afc58fd91c741e0b5fa56246c9f
parentMerge branch 'topic/revamp-openwrt-imag-gen' (diff)
in-place variable cooking
-rw-r--r--chaos-at-home/cloud-install.yml4
-rw-r--r--chaos-at-home/generic.yml6
-rw-r--r--chaos-at-home/iso-generate.yml4
-rw-r--r--chaos-at-home/iso-install.yml4
-rw-r--r--chaos-at-home/k8s-chtest.yml4
-rw-r--r--chaos-at-home/usb-generate.yml4
-rw-r--r--chaos-at-home/usb-install.yml4
-rw-r--r--chaos-at-home/vm-install.yml6
-rw-r--r--common/iso-install.yml2
-rw-r--r--common/vm-install.yml4
-rw-r--r--dan/cloud-install.yml4
-rw-r--r--dan/generic.yml6
-rw-r--r--dan/iso-generate.yml4
-rw-r--r--dan/iso-install.yml4
-rw-r--r--dan/k8s-emc.yml4
-rw-r--r--dan/usb-generate.yml4
-rw-r--r--dan/usb-install.yml4
-rw-r--r--dan/vm-install.yml6
-rw-r--r--roles/cloud/install/tasks/hcloud.yml10
-rw-r--r--roles/cloud/install/tasks/hroot.yml22
-rw-r--r--roles/cloud/install/templates/hetzner_installimage.conf.j212
-rw-r--r--roles/cloud/install/templates/hetzner_postinst.sh.j24
-rw-r--r--roles/installer/debian/iso/tasks/main.yml2
-rw-r--r--roles/installer/debian/iso/templates/grub.cfg.j22
-rw-r--r--roles/installer/debian/iso/templates/isolinux.cfg.j22
-rw-r--r--roles/installer/debian/preseed/templates/partman_config.j214
-rw-r--r--roles/installer/debian/preseed/templates/partman_early-command.sh.j210
-rw-r--r--roles/installer/debian/preseed/templates/preseed_debian-bullseye.cfg.j214
-rw-r--r--roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j214
-rw-r--r--roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j214
-rw-r--r--roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j214
-rw-r--r--roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j216
-rw-r--r--roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j216
-rw-r--r--roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j216
-rw-r--r--roles/installer/debian/usb/tasks/main.yml2
-rw-r--r--roles/installer/debian/usb/templates/syslinux.cfg.j22
-rw-r--r--roles/installer/openbsd/autoinstall/templates/auto_install.conf.j212
-rw-r--r--roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j248
-rw-r--r--roles/installer/ubuntu/iso/tasks/main.yml2
-rw-r--r--roles/installer/ubuntu/iso/templates/grub.cfg.j22
-rw-r--r--roles/installer/ubuntu/iso/templates/isolinux.cfg.j22
-rw-r--r--roles/installer/ubuntu/usb/tasks/main.yml2
-rw-r--r--roles/installer/ubuntu/usb/templates/grub.cfg.j22
-rw-r--r--roles/installer/ubuntu/usb/templates/isolinux.cfg.j22
-rw-r--r--roles/kubernetes/kubeadm/base/templates/net_kubeguard/peer.service.j22
-rw-r--r--roles/kubernetes/kubeadm/master/templates/encryption-config.j22
-rw-r--r--roles/vm/guest/base/tasks/Debian.yml2
-rw-r--r--roles/vm/guest/define/defaults/main.yml2
-rw-r--r--roles/vm/guest/define/tasks/main.yml10
-rw-r--r--roles/vm/guest/define/templates/libvirt-domain.xml.j218
-rw-r--r--roles/vm/guest/install/tasks/installer-debian.yml4
-rw-r--r--roles/vm/guest/install/tasks/installer-openbsd.yml8
-rw-r--r--roles/vm/guest/install/tasks/main.yml24
-rw-r--r--roles/vm/guest/network/tasks/Debian.yml4
-rw-r--r--roles/vm/guest/network/tasks/OpenBSD.yml2
-rw-r--r--roles/vm/guest/network/templates/interfaces.j22
-rw-r--r--roles/vm/guest/network/templates/resolv.conf.j24
-rw-r--r--spreadspace/cloud-install.yml4
-rw-r--r--spreadspace/generic.yml6
-rw-r--r--spreadspace/iso-generate.yml4
-rw-r--r--spreadspace/iso-install.yml4
-rw-r--r--spreadspace/k8s-lwl.yml4
-rw-r--r--spreadspace/usb-generate.yml4
-rw-r--r--spreadspace/usb-install.yml4
-rw-r--r--spreadspace/vm-install.yml6
65 files changed, 219 insertions, 237 deletions
diff --git a/chaos-at-home/cloud-install.yml b/chaos-at-home/cloud-install.yml
index 31c757a1..1a7b26c0 100644
--- a/chaos-at-home/cloud-install.yml
+++ b/chaos-at-home/cloud-install.yml
@@ -4,7 +4,7 @@
gather_facts: no
tasks:
- set_fact:
- install_cooked: "{{ install }}"
- network_cooked: "{{ network }}"
+ install: "{{ install }}"
+ network: "{{ network }}"
- import_playbook: ../common/cloud-install.yml
diff --git a/chaos-at-home/generic.yml b/chaos-at-home/generic.yml
index 9a495ffb..bc8866c5 100644
--- a/chaos-at-home/generic.yml
+++ b/chaos-at-home/generic.yml
@@ -1,11 +1,5 @@
---
- name: "Apply role {{ myrole }} to hosts: {{ myhosts }}"
hosts: "{{ myhosts }}"
- pre_tasks:
- - name: cook some variables for roles that expect them to be cooked
- set_fact:
- install_cooked: "{{ install | default({}) }}"
- network_cooked: "{{ network | default({}) }}"
- vm_host_cooked: "{{ vm_host | default({}) }}"
roles:
- role: "{{ myrole }}"
diff --git a/chaos-at-home/iso-generate.yml b/chaos-at-home/iso-generate.yml
index 2f0c8345..59a077ae 100644
--- a/chaos-at-home/iso-generate.yml
+++ b/chaos-at-home/iso-generate.yml
@@ -4,7 +4,7 @@
gather_facts: no
tasks:
- set_fact:
- install_cooked: "{{ install }}"
- network_cooked: "{{ network }}"
+ install: "{{ install }}"
+ network: "{{ network }}"
- import_playbook: ../common/iso-generate.yml
diff --git a/chaos-at-home/iso-install.yml b/chaos-at-home/iso-install.yml
index 0ae125a2..91dfca9e 100644
--- a/chaos-at-home/iso-install.yml
+++ b/chaos-at-home/iso-install.yml
@@ -4,7 +4,7 @@
gather_facts: no
tasks:
- set_fact:
- install_cooked: "{{ install }}"
- network_cooked: "{{ network }}"
+ install: "{{ install }}"
+ network: "{{ network }}"
- import_playbook: ../common/iso-install.yml
diff --git a/chaos-at-home/k8s-chtest.yml b/chaos-at-home/k8s-chtest.yml
index 66e28426..5f7c830e 100644
--- a/chaos-at-home/k8s-chtest.yml
+++ b/chaos-at-home/k8s-chtest.yml
@@ -21,10 +21,10 @@
gather_facts: no
tasks:
- set_fact:
- kubernetes_secrets_cooked: "{{ kubernetes_secrets }}"
+ kubernetes_secrets: "{{ kubernetes_secrets }}"
- when: external_ip is defined
set_fact:
- external_ip_cooked: "{{ external_ip }}"
+ external_ip: "{{ external_ip }}"
- import_playbook: ../common/kubernetes-cluster.yml
- import_playbook: ../common/kubernetes-cluster-cleanup.yml
diff --git a/chaos-at-home/usb-generate.yml b/chaos-at-home/usb-generate.yml
index 3340d93b..12582abe 100644
--- a/chaos-at-home/usb-generate.yml
+++ b/chaos-at-home/usb-generate.yml
@@ -4,7 +4,7 @@
gather_facts: no
tasks:
- set_fact:
- install_cooked: "{{ install }}"
- network_cooked: "{{ network }}"
+ install: "{{ install }}"
+ network: "{{ network }}"
- import_playbook: ../common/usb-generate.yml
diff --git a/chaos-at-home/usb-install.yml b/chaos-at-home/usb-install.yml
index 04bf2594..ae948707 100644
--- a/chaos-at-home/usb-install.yml
+++ b/chaos-at-home/usb-install.yml
@@ -4,7 +4,7 @@
gather_facts: no
tasks:
- set_fact:
- install_cooked: "{{ install }}"
- network_cooked: "{{ network }}"
+ install: "{{ install }}"
+ network: "{{ network }}"
- import_playbook: ../common/usb-install.yml
diff --git a/chaos-at-home/vm-install.yml b/chaos-at-home/vm-install.yml
index 7d8e7320..7db00cba 100644
--- a/chaos-at-home/vm-install.yml
+++ b/chaos-at-home/vm-install.yml
@@ -4,8 +4,8 @@
gather_facts: no
tasks:
- set_fact:
- install_cooked: "{{ install }}"
- network_cooked: "{{ network }}"
- vm_host_cooked: "{{ vm_host }}"
+ install: "{{ install }}"
+ network: "{{ network }}"
+ vm_host: "{{ vm_host }}"
- import_playbook: ../common/vm-install.yml
diff --git a/common/iso-install.yml b/common/iso-install.yml
index 810761d2..796ae0d9 100644
--- a/common/iso-install.yml
+++ b/common/iso-install.yml
@@ -20,7 +20,7 @@
{{ iso_install_image_path | realpath }}
Please load the image into the machine and boot from it.
- {% if install_distro == "debian" and install_cooked.efi is defined and install_cooked.efi %}
+ {% if install_distro == "debian" and install.efi is defined and install.efi %}
Mind that debian mini.iso based installers have a bug that prevents grub from loading the correct
config file on EFI systems. In case you only see a grub shell prompt ('grub>') after booting the
diff --git a/common/vm-install.yml b/common/vm-install.yml
index 6c98ae73..90b08c56 100644
--- a/common/vm-install.yml
+++ b/common/vm-install.yml
@@ -11,9 +11,9 @@
- name: check if the host system belongs to the kvmhosts group
fail:
- msg: "the host '{{ vm_host_cooked.name }}' does not belong to the group 'kvmhosts'"
+ msg: "the host '{{ vm_host.name }}' does not belong to the group 'kvmhosts'"
when:
- - "'kvmhosts' not in hostvars[vm_host_cooked.name].group_names"
+ - "'kvmhosts' not in hostvars[vm_host.name].group_names"
# TODO: add some more sanity checks
diff --git a/dan/cloud-install.yml b/dan/cloud-install.yml
index 31c757a1..1a7b26c0 100644
--- a/dan/cloud-install.yml
+++ b/dan/cloud-install.yml
@@ -4,7 +4,7 @@
gather_facts: no
tasks:
- set_fact:
- install_cooked: "{{ install }}"
- network_cooked: "{{ network }}"
+ install: "{{ install }}"
+ network: "{{ network }}"
- import_playbook: ../common/cloud-install.yml
diff --git a/dan/generic.yml b/dan/generic.yml
index 9a495ffb..bc8866c5 100644
--- a/dan/generic.yml
+++ b/dan/generic.yml
@@ -1,11 +1,5 @@
---
- name: "Apply role {{ myrole }} to hosts: {{ myhosts }}"
hosts: "{{ myhosts }}"
- pre_tasks:
- - name: cook some variables for roles that expect them to be cooked
- set_fact:
- install_cooked: "{{ install | default({}) }}"
- network_cooked: "{{ network | default({}) }}"
- vm_host_cooked: "{{ vm_host | default({}) }}"
roles:
- role: "{{ myrole }}"
diff --git a/dan/iso-generate.yml b/dan/iso-generate.yml
index 2f0c8345..59a077ae 100644
--- a/dan/iso-generate.yml
+++ b/dan/iso-generate.yml
@@ -4,7 +4,7 @@
gather_facts: no
tasks:
- set_fact:
- install_cooked: "{{ install }}"
- network_cooked: "{{ network }}"
+ install: "{{ install }}"
+ network: "{{ network }}"
- import_playbook: ../common/iso-generate.yml
diff --git a/dan/iso-install.yml b/dan/iso-install.yml
index 0ae125a2..91dfca9e 100644
--- a/dan/iso-install.yml
+++ b/dan/iso-install.yml
@@ -4,7 +4,7 @@
gather_facts: no
tasks:
- set_fact:
- install_cooked: "{{ install }}"
- network_cooked: "{{ network }}"
+ install: "{{ install }}"
+ network: "{{ network }}"
- import_playbook: ../common/iso-install.yml
diff --git a/dan/k8s-emc.yml b/dan/k8s-emc.yml
index 92cc909a..96b61066 100644
--- a/dan/k8s-emc.yml
+++ b/dan/k8s-emc.yml
@@ -22,10 +22,10 @@
gather_facts: no
tasks:
- set_fact:
- kubernetes_secrets_cooked: "{{ kubernetes_secrets }}"
+ kubernetes_secrets: "{{ kubernetes_secrets }}"
- when: external_ip is defined
set_fact:
- external_ip_cooked: "{{ external_ip }}"
+ external_ip: "{{ external_ip }}"
- import_playbook: ../common/kubernetes-cluster.yml
- import_playbook: ../common/kubernetes-cluster-cleanup.yml
diff --git a/dan/usb-generate.yml b/dan/usb-generate.yml
index 3340d93b..12582abe 100644
--- a/dan/usb-generate.yml
+++ b/dan/usb-generate.yml
@@ -4,7 +4,7 @@
gather_facts: no
tasks:
- set_fact:
- install_cooked: "{{ install }}"
- network_cooked: "{{ network }}"
+ install: "{{ install }}"
+ network: "{{ network }}"
- import_playbook: ../common/usb-generate.yml
diff --git a/dan/usb-install.yml b/dan/usb-install.yml
index 04bf2594..ae948707 100644
--- a/dan/usb-install.yml
+++ b/dan/usb-install.yml
@@ -4,7 +4,7 @@
gather_facts: no
tasks:
- set_fact:
- install_cooked: "{{ install }}"
- network_cooked: "{{ network }}"
+ install: "{{ install }}"
+ network: "{{ network }}"
- import_playbook: ../common/usb-install.yml
diff --git a/dan/vm-install.yml b/dan/vm-install.yml
index 7d8e7320..7db00cba 100644
--- a/dan/vm-install.yml
+++ b/dan/vm-install.yml
@@ -4,8 +4,8 @@
gather_facts: no
tasks:
- set_fact:
- install_cooked: "{{ install }}"
- network_cooked: "{{ network }}"
- vm_host_cooked: "{{ vm_host }}"
+ install: "{{ install }}"
+ network: "{{ network }}"
+ vm_host: "{{ vm_host }}"
- import_playbook: ../common/vm-install.yml
diff --git a/roles/cloud/install/tasks/hcloud.yml b/roles/cloud/install/tasks/hcloud.yml
index b716f4ac..cd46d348 100644
--- a/roles/cloud/install/tasks/hcloud.yml
+++ b/roles/cloud/install/tasks/hcloud.yml
@@ -6,7 +6,7 @@
url: "https://api.hetzner.cloud/v1/ssh_keys"
method: GET
headers:
- Authorization: "Bearer {{ install_cooked.cloud.credentials.token }}"
+ Authorization: "Bearer {{ install.cloud.credentials.token }}"
status_code: 200
register: sshkeys
@@ -14,10 +14,10 @@
delegate_to: localhost
check_mode: no
uri:
- url: "https://api.hetzner.cloud/v1/servers?name={{ install_cooked.cloud.server_name | default(inventory_hostname) }}"
+ url: "https://api.hetzner.cloud/v1/servers?name={{ install.cloud.server_name | default(inventory_hostname) }}"
method: GET
headers:
- Authorization: "Bearer {{ install_cooked.cloud.credentials.token }}"
+ Authorization: "Bearer {{ install.cloud.credentials.token }}"
status_code: 200
register: serverstatus
@@ -48,7 +48,7 @@
method: POST
body: "{{ {'type': 'linux64', 'ssh_keys': (sshkeys.json.ssh_keys | map(attribute='id') | list) } | to_nice_json }}"
headers:
- Authorization: "Bearer {{ install_cooked.cloud.credentials.token }}"
+ Authorization: "Bearer {{ install.cloud.credentials.token }}"
Content-Type: "application/json"
status_code: 201
@@ -62,7 +62,7 @@
url: "https://api.hetzner.cloud/v1/servers/{{ serverstatus.json.servers[0].id }}/actions/reset"
method: POST
headers:
- Authorization: "Bearer {{ install_cooked.cloud.credentials.token }}"
+ Authorization: "Bearer {{ install.cloud.credentials.token }}"
status_code: 201
### TODO: would be nice to get the SSH host key from robot
diff --git a/roles/cloud/install/tasks/hroot.yml b/roles/cloud/install/tasks/hroot.yml
index 1ff4a55d..588ae981 100644
--- a/roles/cloud/install/tasks/hroot.yml
+++ b/roles/cloud/install/tasks/hroot.yml
@@ -5,8 +5,8 @@
uri:
url: "https://robot-ws.your-server.de/key"
method: GET
- user: "{{ install_cooked.cloud.credentials.username }}"
- password: "{{ install_cooked.cloud.credentials.password }}"
+ user: "{{ install.cloud.credentials.username }}"
+ password: "{{ install.cloud.credentials.password }}"
force_basic_auth: yes
status_code: 200
register: sshkeys
@@ -19,15 +19,15 @@
uri:
url: "https://robot-ws.your-server.de/server"
method: GET
- user: "{{ install_cooked.cloud.credentials.username }}"
- password: "{{ install_cooked.cloud.credentials.password }}"
+ user: "{{ install.cloud.credentials.username }}"
+ password: "{{ install.cloud.credentials.password }}"
force_basic_auth: yes
status_code: 200
register: servers
- name: extract server IP address from robot result
set_fact:
- hetzner_main_ip: "{{ servers.json | hroot_extract_serverip(install_cooked.cloud.server_name | default(inventory_hostname)) }}"
+ hetzner_main_ip: "{{ servers.json | hroot_extract_serverip(install.cloud.server_name | default(inventory_hostname)) }}"
- name: do not continue in check mode
when: ansible_check_mode | bool
@@ -48,8 +48,8 @@
uri:
url: "https://robot-ws.your-server.de/boot/{{ hetzner_main_ip }}/rescue"
method: GET
- user: "{{ install_cooked.cloud.credentials.username }}"
- password: "{{ install_cooked.cloud.credentials.password }}"
+ user: "{{ install.cloud.credentials.username }}"
+ password: "{{ install.cloud.credentials.password }}"
force_basic_auth: yes
status_code: 200
register: rescuestatus
@@ -61,8 +61,8 @@
uri:
url: "https://robot-ws.your-server.de/boot/{{ hetzner_main_ip }}/rescue"
method: POST
- user: "{{ install_cooked.cloud.credentials.username }}"
- password: "{{ install_cooked.cloud.credentials.password }}"
+ user: "{{ install.cloud.credentials.username }}"
+ password: "{{ install.cloud.credentials.password }}"
force_basic_auth: yes
body: "os=linux&arch=64&authorized_key[]={{ sshkeys.json | hroot_extract_ssh_key_fingerprints | join('&authorized_key[]=') }}"
status_code: 200
@@ -78,8 +78,8 @@
uri:
url: "https://robot-ws.your-server.de/reset/{{ hetzner_main_ip }}"
method: POST
- user: "{{ install_cooked.cloud.credentials.username }}"
- password: "{{ install_cooked.cloud.credentials.password }}"
+ user: "{{ install.cloud.credentials.username }}"
+ password: "{{ install.cloud.credentials.password }}"
force_basic_auth: yes
body: "type=hw" ## type=sw -> CTRL-ALT-DEL, type=hw -> reset button
status_code: 200
diff --git a/roles/cloud/install/templates/hetzner_installimage.conf.j2 b/roles/cloud/install/templates/hetzner_installimage.conf.j2
index e3cd4c4e..acdf42c4 100644
--- a/roles/cloud/install/templates/hetzner_installimage.conf.j2
+++ b/roles/cloud/install/templates/hetzner_installimage.conf.j2
@@ -1,25 +1,25 @@
HOSTNAME {{ host_name }}{% if host_domain %}.{{ host_domain }}{% endif %}{{ '' }}
{% if cloud_provider == "hroot" %}
-{% if install_cooked.disks.primary == "software-raid" %}
-{% for raid_member in install_cooked.disks.raid.members %}
+{% if install.disks.primary == "software-raid" %}
+{% for raid_member in install.disks.raid.members %}
DRIVE{{ loop.index }} {{ raid_member }}
{% endfor %}
SWRAID 1
-SWRAIDLEVEL {{ install_cooked.disks.raid.level }}
+SWRAIDLEVEL {{ install.disks.raid.level }}
{% else %}
-DRIVE1 {{ install_cooked.disks.primary }}
+DRIVE1 {{ install.disks.primary }}
{% endif %}
{% elif cloud_provider == "hcloud" %}
DRIVE1 /dev/sda
{% endif %}
BOOTLOADER grub
PART /boot ext4 {{ hetzner_boot_size }}
-{% set system_lvm_size = install_cooked.system_lvm.size | default(hetzner_system_lvm_size_default) %}
+{% set system_lvm_size = install.system_lvm.size | default(hetzner_system_lvm_size_default) %}
PART lvm {{ host_name }} {{ system_lvm_size }}
{% if system_lvm_size != "all" %}
PART /dummy ext4 all
{% endif %}
-{% set system_lvm_volumes = install_cooked.system_lvm.volumes | default(hetzner_system_lvm_volumes_default) %}
+{% set system_lvm_volumes = install.system_lvm.volumes | default(hetzner_system_lvm_volumes_default) %}
{% for volume in system_lvm_volumes %}
LV {{ host_name }} {{ volume.name }} {{ volume.mountpoint }} {{ volume.filesystem }} {{ volume.size }}
{% endfor %}
diff --git a/roles/cloud/install/templates/hetzner_postinst.sh.j2 b/roles/cloud/install/templates/hetzner_postinst.sh.j2
index 8f923313..ba9d3eeb 100644
--- a/roles/cloud/install/templates/hetzner_postinst.sh.j2
+++ b/roles/cloud/install/templates/hetzner_postinst.sh.j2
@@ -22,7 +22,7 @@ passwd -d root && passwd -l root
{% if install_distro == "debian" %}
sed -e 's/^allow-hotplug/auto/' -i /etc/network/interfaces
{% endif %}
-{% set system_lvm_volumes = install_cooked.system_lvm.volumes | default(hetzner_system_lvm_volumes_default) %}
+{% set system_lvm_volumes = install.system_lvm.volumes | default(hetzner_system_lvm_volumes_default) %}
{% for volume in system_lvm_volumes %}
{% if 'mount_options' in volume %}
sed -r 's#(\s+{{ volume.mountpoint }}\s+{{ volume.filesystem }}\s+)defaults#\1{{ volume.mount_options | join(",") }}#g' -i /etc/fstab
@@ -42,7 +42,7 @@ swapoff -a
sed -e '/^\/swapfile/d' -i /etc/fstab
rm -f /swapfile
-{% set system_lvm_size = install_cooked.system_lvm.size | default('all') %}
+{% set system_lvm_size = install.system_lvm.size | default('all') %}
{% if system_lvm_size != "all" %}
sed -e '/\/dummy/d' -i /etc/fstab
diff --git a/roles/installer/debian/iso/tasks/main.yml b/roles/installer/debian/iso/tasks/main.yml
index cfbb9721..7ace53c3 100644
--- a/roles/installer/debian/iso/tasks/main.yml
+++ b/roles/installer/debian/iso/tasks/main.yml
@@ -4,7 +4,7 @@
vars:
debian_installer_distro: "{{ install_distro }}"
debian_installer_codename: "{{ install_codename }}"
- debian_installer_arch: "{{ install_cooked.arch | default('amd64') }}"
+ debian_installer_arch: "{{ install.arch | default('amd64') }}"
debian_installer_variant: mini-iso
import_role:
role: installer/debian/fetch
diff --git a/roles/installer/debian/iso/templates/grub.cfg.j2 b/roles/installer/debian/iso/templates/grub.cfg.j2
index e2f480fa..4e83cd6c 100644
--- a/roles/installer/debian/iso/templates/grub.cfg.j2
+++ b/roles/installer/debian/iso/templates/grub.cfg.j2
@@ -15,6 +15,6 @@ set timeout=10
set default=0
menuentry "automated installer for {{ inventory_hostname }}" {
- linux /linux --- auto {{ (install_cooked.kernel_cmdline | default([])) | join(' ') }}
+ linux /linux --- auto {{ (install.kernel_cmdline | default([])) | join(' ') }}
initrd /initrd.gz
}
diff --git a/roles/installer/debian/iso/templates/isolinux.cfg.j2 b/roles/installer/debian/iso/templates/isolinux.cfg.j2
index 1a758bda..aa14696f 100644
--- a/roles/installer/debian/iso/templates/isolinux.cfg.j2
+++ b/roles/installer/debian/iso/templates/isolinux.cfg.j2
@@ -12,4 +12,4 @@ SAY **
LABEL {{ inventory_hostname }}
KERNEL linux
INITRD initrd.gz
- APPEND auto fb=false {{ (install_cooked.kernel_cmdline | default([])) | join(' ') }}
+ APPEND auto fb=false {{ (install.kernel_cmdline | default([])) | join(' ') }}
diff --git a/roles/installer/debian/preseed/templates/partman_config.j2 b/roles/installer/debian/preseed/templates/partman_config.j2
index 77bc0f8b..70d218a7 100644
--- a/roles/installer/debian/preseed/templates/partman_config.j2
+++ b/roles/installer/debian/preseed/templates/partman_config.j2
@@ -15,7 +15,7 @@ d-i partman-auto-lvm/new_vg_name string {{ host_name }}
d-i partman-auto-lvm/guided_size string max
d-i partman-auto-lvm/no_boot boolean true
-{% if (install_cooked.efi | default(false)) %}
+{% if (install.efi | default(false)) %}
d-i partman-efi/non_efi_system boolean true
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
@@ -32,29 +32,29 @@ d-i partman-basicfilesystems/choose_label string msdos
d-i partman-basicfilesystems/default_label string msdos
{% endif %}
-{% set system_lvm_size = install_cooked.system_lvm.size | default(debian_preseed_system_lvm_size_default) %}
-{% set system_lvm_volumes = install_cooked.system_lvm.volumes | default(debian_preseed_system_lvm_volumes_default) %}
+{% set system_lvm_size = install.system_lvm.size | default(debian_preseed_system_lvm_size_default) %}
+{% set system_lvm_volumes = install.system_lvm.volumes | default(debian_preseed_system_lvm_volumes_default) %}
{# on small disks this probably triggers: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=896826 ... #}
-{# set system_lvm_reserve = install_cooked.system_lvm.reserve | default(debian_preseed_system_lvm_reserve_default) #}
+{# set system_lvm_reserve = install.system_lvm.reserve | default(debian_preseed_system_lvm_reserve_default) #}
{# set system_lvm_pv_size_min_mb = (((system_lvm_volumes | map(attribute='size') | map('human_to_bytes') | sum) / (1024*1024)) | int) + (((system_lvm_reserve | human_to_bytes) / (1024*1024)) | int) #}
{# ... so let's go for a 1 MB minimum. #}
{% set system_lvm_pv_size_min_mb = 1 %}
-{% if install_cooked.disks.primary == "software-raid" %}
+{% if install.disks.primary == "software-raid" %}
d-i partman-auto/method string raid
{% else %}
d-i partman-auto/method string lvm
{% endif %}
d-i partman-auto/expert_recipe string \
ansible :: \
-{% if (install_cooked.efi | default(false)) %}
+{% if (install.efi | default(false)) %}
{% set efi_esp_size_mb = ((debian_preseed_efi_esp_size | human_to_bytes) / (1024*1024)) | int %}
{{ efi_esp_size_mb }} {{ efi_esp_size_mb }} {{ efi_esp_size_mb }} fat16 \
$primary{ } $bootable{ } \
method{ efi } format{ } \
. \
{% endif %}
-{% if install_cooked.disks.primary == "software-raid" %}
+{% if install.disks.primary == "software-raid" %}
{% set swraid_boot_size_mb = ((debian_preseed_swraid_boot_size | human_to_bytes) / (1024*1024)) | int %}
{{ swraid_boot_size_mb }} {{ swraid_boot_size_mb }} {{ swraid_boot_size_mb }} raid \
$lvmignore{ } $primary{ } $bootable{ } \
diff --git a/roles/installer/debian/preseed/templates/partman_early-command.sh.j2 b/roles/installer/debian/preseed/templates/partman_early-command.sh.j2
index c7ceb8c6..4e8215c2 100644
--- a/roles/installer/debian/preseed/templates/partman_early-command.sh.j2
+++ b/roles/installer/debian/preseed/templates/partman_early-command.sh.j2
@@ -3,10 +3,10 @@
umount -l /media || true
-{% if install_cooked.disks.primary == "software-raid" %}
-disks="{% for disk in install_cooked.disks.raid.members %}$(readlink -f {{ disk }}) {% endfor %}"
+{% if install.disks.primary == "software-raid" %}
+disks="{% for disk in install.disks.raid.members %}$(readlink -f {{ disk }}) {% endfor %}"
-{% if (install_cooked.efi | default(false)) %}
+{% if (install.efi | default(false)) %}
idx=1
{% else %}
idx=0
@@ -24,11 +24,11 @@ for disk in $disks; do
raid_members_lvm="$raid_members_lvm$disk"p$((idx + 2))
fi
done
-raid_config="{{ install_cooked.disks.raid.level }} {{ install_cooked.disks.raid.members | length }} 0"
+raid_config="{{ install.disks.raid.level }} {{ install.disks.raid.members | length }} 0"
debconf-set partman-auto-raid/recipe "$raid_config ext4 /boot $raid_members_boot . $raid_config lvm - $raid_members_lvm ."
{% else %}
-disks="$(readlink -f {{ install_cooked.disks.primary }})"
+disks="$(readlink -f {{ install.disks.primary }})"
{% endif %}
debconf-set partman-auto/disk "$disks"
debconf-set grub-installer/bootdev "$disks"
diff --git a/roles/installer/debian/preseed/templates/preseed_debian-bullseye.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_debian-bullseye.cfg.j2
index fa3304f4..e4c0a80c 100644
--- a/roles/installer/debian/preseed/templates/preseed_debian-bullseye.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_debian-bullseye.cfg.j2
@@ -14,24 +14,24 @@ d-i keyboard-configuration/variantcode string {{ debian_preseed_keyboard_variant
d-i hw-detect/load_firmware boolean false
-d-i netcfg/choose_interface select {{ install_interface | default(network_cooked.primary.name) }}
+d-i netcfg/choose_interface select {{ install_interface | default(network.primary.name) }}
{% if (install_dhcp | default(false)) %}
d-i netcfg/disable_dhcp boolean false
d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ network_cooked.primary.address | ipaddr('address') }}
-d-i netcfg/get_netmask string {{ network_cooked.primary.address | ipaddr('netmask') }}
-d-i netcfg/get_gateway string {{ network_cooked.primary.gateway }}
-d-i netcfg/get_nameservers string {{ network_cooked.nameservers | join(' ') }}
+d-i netcfg/get_ipaddress string {{ network.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ network.primary.address | ipaddr('netmask') }}
+d-i netcfg/get_gateway string {{ network.primary.gateway }}
+d-i netcfg/get_nameservers string {{ network.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
{% endif %}
d-i netcfg/hostname string {{ host_name }}
d-i netcfg/get_hostname string {{ host_name }}
-d-i netcfg/domain string {{ network_cooked.domain }}
-d-i netcfg/get_domain string {{ network_cooked.domain }}
+d-i netcfg/domain string {{ network.domain }}
+d-i netcfg/get_domain string {{ network.domain }}
d-i netcfg/wireless_wep string
diff --git a/roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j2
index 23fe064d..edd360e1 100644
--- a/roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j2
@@ -14,24 +14,24 @@ d-i keyboard-configuration/variantcode string {{ debian_preseed_keyboard_variant
d-i hw-detect/load_firmware boolean false
-d-i netcfg/choose_interface select {{ install_interface | default(network_cooked.primary.name) }}
+d-i netcfg/choose_interface select {{ install_interface | default(network.primary.name) }}
{% if (install_dhcp | default(false)) %}
d-i netcfg/disable_dhcp boolean false
d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ network_cooked.primary.address | ipaddr('address') }}
-d-i netcfg/get_netmask string {{ network_cooked.primary.address | ipaddr('netmask') }}
-d-i netcfg/get_gateway string {{ network_cooked.primary.gateway }}
-d-i netcfg/get_nameservers string {{ network_cooked.nameservers | join(' ') }}
+d-i netcfg/get_ipaddress string {{ network.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ network.primary.address | ipaddr('netmask') }}
+d-i netcfg/get_gateway string {{ network.primary.gateway }}
+d-i netcfg/get_nameservers string {{ network.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
{% endif %}
d-i netcfg/hostname string {{ host_name }}
d-i netcfg/get_hostname string {{ host_name }}
-d-i netcfg/domain string {{ network_cooked.domain }}
-d-i netcfg/get_domain string {{ network_cooked.domain }}
+d-i netcfg/domain string {{ network.domain }}
+d-i netcfg/get_domain string {{ network.domain }}
d-i netcfg/wireless_wep string
diff --git a/roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j2
index 46a8be9a..39d17262 100644
--- a/roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j2
@@ -14,24 +14,24 @@ d-i keyboard-configuration/variantcode string {{ debian_preseed_keyboard_variant
d-i hw-detect/load_firmware boolean false
-d-i netcfg/choose_interface select {{ install_interface | default(network_cooked.primary.name) }}
+d-i netcfg/choose_interface select {{ install_interface | default(network.primary.name) }}
{% if (install_dhcp | default(false)) %}
d-i netcfg/disable_dhcp boolean false
d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ network_cooked.primary.address | ipaddr('address') }}
-d-i netcfg/get_netmask string {{ network_cooked.primary.address | ipaddr('netmask') }}
-d-i netcfg/get_gateway string {{ network_cooked.primary.gateway }}
-d-i netcfg/get_nameservers string {{ network_cooked.nameservers | join(' ') }}
+d-i netcfg/get_ipaddress string {{ network.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ network.primary.address | ipaddr('netmask') }}
+d-i netcfg/get_gateway string {{ network.primary.gateway }}
+d-i netcfg/get_nameservers string {{ network.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
{% endif %}
d-i netcfg/hostname string {{ host_name }}
d-i netcfg/get_hostname string {{ host_name }}
-d-i netcfg/domain string {{ network_cooked.domain }}
-d-i netcfg/get_domain string {{ network_cooked.domain }}
+d-i netcfg/domain string {{ network.domain }}
+d-i netcfg/get_domain string {{ network.domain }}
d-i netcfg/wireless_wep string
diff --git a/roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j2
index 172f1879..4c7b2f12 100644
--- a/roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j2
@@ -14,24 +14,24 @@ d-i keyboard-configuration/variantcode string {{ debian_preseed_keyboard_variant
d-i hw-detect/load_firmware boolean false
-d-i netcfg/choose_interface select {{ install_interface | default(network_cooked.primary.name) }}
+d-i netcfg/choose_interface select {{ install_interface | default(network.primary.name) }}
{% if (install_dhcp | default(false)) %}
d-i netcfg/disable_dhcp boolean false
d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ network_cooked.primary.address | ipaddr('address') }}
-d-i netcfg/get_netmask string {{ network_cooked.primary.address | ipaddr('netmask') }}
-d-i netcfg/get_gateway string {{ network_cooked.primary.gateway }}
-d-i netcfg/get_nameservers string {{ network_cooked.nameservers | join(' ') }}
+d-i netcfg/get_ipaddress string {{ network.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ network.primary.address | ipaddr('netmask') }}
+d-i netcfg/get_gateway string {{ network.primary.gateway }}
+d-i netcfg/get_nameservers string {{ network.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
{% endif %}
d-i netcfg/hostname string {{ host_name }}
d-i netcfg/get_hostname string {{ host_name }}
-d-i netcfg/domain string {{ network_cooked.domain }}
-d-i netcfg/get_domain string {{ network_cooked.domain }}
+d-i netcfg/domain string {{ network.domain }}
+d-i netcfg/get_domain string {{ network.domain }}
d-i netcfg/wireless_wep string
diff --git a/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2
index 3f31f66b..a36e3d9d 100644
--- a/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2
@@ -18,24 +18,24 @@ d-i hw-detect/load_firmware boolean false
{% if debian_preseed_no_netplan %}
d-i netcfg/do_not_use_netplan boolean true
{% endif %}
-d-i netcfg/choose_interface select {{ install_interface | default(network_cooked.primary.name) }}
+d-i netcfg/choose_interface select {{ install_interface | default(network.primary.name) }}
{% if (install_dhcp | default(false)) %}
d-i netcfg/disable_dhcp boolean false
d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ network_cooked.primary.address | ipaddr('address') }}
-d-i netcfg/get_netmask string {{ network_cooked.primary.address | ipaddr('netmask') }}
-d-i netcfg/get_gateway string {{ network_cooked.primary.gateway }}
-d-i netcfg/get_nameservers string {{ network_cooked.nameservers | join(' ') }}
+d-i netcfg/get_ipaddress string {{ network.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ network.primary.address | ipaddr('netmask') }}
+d-i netcfg/get_gateway string {{ network.primary.gateway }}
+d-i netcfg/get_nameservers string {{ network.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
{% endif %}
d-i netcfg/hostname string {{ host_name }}
d-i netcfg/get_hostname string {{ host_name }}
-d-i netcfg/domain string {{ network_cooked.domain }}
-d-i netcfg/get_domain string {{ network_cooked.domain }}
+d-i netcfg/domain string {{ network.domain }}
+d-i netcfg/get_domain string {{ network.domain }}
d-i netcfg/wireless_wep string
@@ -74,7 +74,7 @@ d-i debian-installer/add-kernel-opts string nosplash
d-i base-installer/install-recommends boolean false
d-i apt-setup/security_host string {{ apt_repo_providers[apt_repo_provider].ubuntu.host }}
d-i apt-setup/security_path string {{ apt_repo_providers[apt_repo_provider].ubuntu.path }}
-{% if install_cooked.arch | default('amd64') == 'amd64' %}
+{% if install.arch | default('amd64') == 'amd64' %}
d-i apt-setup/multiarch string amd64
{% endif %}
diff --git a/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2
index f895a668..abcbe576 100644
--- a/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2
@@ -18,24 +18,24 @@ d-i hw-detect/load_firmware boolean false
{% if debian_preseed_no_netplan %}
d-i netcfg/do_not_use_netplan boolean true
{% endif %}
-d-i netcfg/choose_interface select {{ install_interface | default(network_cooked.primary.name) }}
+d-i netcfg/choose_interface select {{ install_interface | default(network.primary.name) }}
{% if (install_dhcp | default(false)) %}
d-i netcfg/disable_dhcp boolean false
d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ network_cooked.primary.address | ipaddr('address') }}
-d-i netcfg/get_netmask string {{ network_cooked.primary.address | ipaddr('netmask') }}
-d-i netcfg/get_gateway string {{ network_cooked.primary.gateway }}
-d-i netcfg/get_nameservers string {{ network_cooked.nameservers | join(' ') }}
+d-i netcfg/get_ipaddress string {{ network.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ network.primary.address | ipaddr('netmask') }}
+d-i netcfg/get_gateway string {{ network.primary.gateway }}
+d-i netcfg/get_nameservers string {{ network.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
{% endif %}
d-i netcfg/hostname string {{ host_name }}
d-i netcfg/get_hostname string {{ host_name }}
-d-i netcfg/domain string {{ network_cooked.domain }}
-d-i netcfg/get_domain string {{ network_cooked.domain }}
+d-i netcfg/domain string {{ network.domain }}
+d-i netcfg/get_domain string {{ network.domain }}
d-i netcfg/wireless_wep string
@@ -74,7 +74,7 @@ d-i debian-installer/add-kernel-opts string nosplash
d-i base-installer/install-recommends boolean false
d-i apt-setup/security_host string {{ apt_repo_providers[apt_repo_provider].ubuntu.host }}
d-i apt-setup/security_path string {{ apt_repo_providers[apt_repo_provider].ubuntu.path }}
-{% if install_cooked.arch | default('amd64') == 'amd64' %}
+{% if install.arch | default('amd64') == 'amd64' %}
d-i apt-setup/multiarch string amd64
{% endif %}
diff --git a/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2
index 248afd67..3a8e35b5 100644
--- a/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2
@@ -15,24 +15,24 @@ d-i keyboard-configuration/variantcode string {{ debian_preseed_keyboard_variant
d-i hw-detect/load_firmware boolean false
-d-i netcfg/choose_interface select {{ install_interface | default(network_cooked.primary.name) }}
+d-i netcfg/choose_interface select {{ install_interface | default(network.primary.name) }}
{% if (install_dhcp | default(false)) %}
d-i netcfg/disable_dhcp boolean false
d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ network_cooked.primary.address | ipaddr('address') }}
-d-i netcfg/get_netmask string {{ network_cooked.primary.address | ipaddr('netmask') }}
-d-i netcfg/get_gateway string {{ network_cooked.primary.gateway }}
-d-i netcfg/get_nameservers string {{ network_cooked.nameservers | join(' ') }}
+d-i netcfg/get_ipaddress string {{ network.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ network.primary.address | ipaddr('netmask') }}
+d-i netcfg/get_gateway string {{ network.primary.gateway }}
+d-i netcfg/get_nameservers string {{ network.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
{% endif %}
d-i netcfg/hostname string {{ host_name }}
d-i netcfg/get_hostname string {{ host_name }}
-d-i netcfg/domain string {{ network_cooked.domain }}
-d-i netcfg/get_domain string {{ network_cooked.domain }}
+d-i netcfg/domain string {{ network.domain }}
+d-i netcfg/get_domain string {{ network.domain }}
d-i netcfg/wireless_wep string
@@ -71,7 +71,7 @@ d-i debian-installer/add-kernel-opts string nosplash
d-i base-installer/install-recommends boolean false
d-i apt-setup/security_host string {{ apt_repo_providers[apt_repo_provider].ubuntu.host }}
d-i apt-setup/security_path string {{ apt_repo_providers[apt_repo_provider].ubuntu.path }}
-{% if install_cooked.arch | default('amd64') == 'amd64' %}
+{% if install.arch | default('amd64') == 'amd64' %}
d-i apt-setup/multiarch string amd64
{% endif %}
diff --git a/roles/installer/debian/usb/tasks/main.yml b/roles/installer/debian/usb/tasks/main.yml
index ced56372..6beb0121 100644
--- a/roles/installer/debian/usb/tasks/main.yml
+++ b/roles/installer/debian/usb/tasks/main.yml
@@ -16,7 +16,7 @@
vars:
debian_installer_distro: "{{ install_distro }}"
debian_installer_codename: "{{ install_codename }}"
- debian_installer_arch: "{{ install_cooked.arch | default('amd64') }}"
+ debian_installer_arch: "{{ install.arch | default('amd64') }}"
debian_installer_variant: netboot
import_role:
role: installer/debian/fetch
diff --git a/roles/installer/debian/usb/templates/syslinux.cfg.j2 b/roles/installer/debian/usb/templates/syslinux.cfg.j2
index badb7e81..79c9d78e 100644
--- a/roles/installer/debian/usb/templates/syslinux.cfg.j2
+++ b/roles/installer/debian/usb/templates/syslinux.cfg.j2
@@ -21,5 +21,5 @@ LABEL {{ host }}
MENU LABEL automated installer for {{ host }}
KERNEL linux
INITRD initrd.{{ host }}.gz
- APPEND auto fb=false {{ (hostvars[host].install_cooked.kernel_cmdline | default([])) | join(' ') }}
+ APPEND auto fb=false {{ (hostvars[host].install.kernel_cmdline | default([])) | join(' ') }}
{% endfor %}
diff --git a/roles/installer/openbsd/autoinstall/templates/auto_install.conf.j2 b/roles/installer/openbsd/autoinstall/templates/auto_install.conf.j2
index 4cfdbfa7..e6437ff1 100644
--- a/roles/installer/openbsd/autoinstall/templates/auto_install.conf.j2
+++ b/roles/installer/openbsd/autoinstall/templates/auto_install.conf.j2
@@ -1,15 +1,15 @@
System hostname = {{ host_name }}
-Which network interface do you wish to configure = {{ install_interface | default(network_cooked.primary.name) }}
+Which network interface do you wish to configure = {{ install_interface | default(network.primary.name) }}
{% if (install_dhcp | default(false)) %}
IPv4 address = dhcp
{% else %}
-IPv4 address = {{ network_cooked.primary.address | ipaddr('address') }}
-Netmask = {{ network_cooked.primary.address | ipaddr('netmask') }}
-Default IPv4 route = {{ network_cooked.primary.gateway }}
+IPv4 address = {{ network.primary.address | ipaddr('address') }}
+Netmask = {{ network.primary.address | ipaddr('netmask') }}
+Default IPv4 route = {{ network.primary.gateway }}
{% endif %}
-DNS domain name = {{ network_cooked.domain }}
-DNS nameservers = {{ network_cooked.nameservers | join(' ') }}
+DNS domain name = {{ network.domain }}
+DNS nameservers = {{ network.nameservers | join(' ') }}
{% if obsd_autoinstall_serial_device is defined %}
Change the default console to {{ obsd_autoinstall_serial_device }} = yes
diff --git a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
index 8b4538d5..85fb9d53 100644
--- a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
+++ b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
@@ -13,27 +13,27 @@ autoinstall:
network:
version: 2
ethernets:
- {{ install_interface | default(network_cooked.primary.name) }}:
+ {{ install_interface | default(network.primary.name) }}:
{% if install_dhcp | default(false) %}
dhcp4: yes
{% else %}
addresses:
- - {{ network_cooked.primary.address }}
- gateway4: {{ network_cooked.primary.gateway }}
-{% if (network_cooked.nameservers | default([]) | length) > 0 %}
+ - {{ network.primary.address }}
+ gateway4: {{ network.primary.gateway }}
+{% if (network.nameservers | default([]) | length) > 0 %}
nameservers:
search: [ {{ host_domain }} ]
- addresses: [ {{ network_cooked.nameservers | join(', ') }} ]
+ addresses: [ {{ network.nameservers | join(', ') }} ]
{% endif %}
{% endif %}
storage:
config:
-{% if install_cooked.disks.primary != "software-raid" %}
+{% if install.disks.primary != "software-raid" %}
- id: disk-primary
type: disk
- path: {{ install_cooked.disks.primary }}
-{% if install_cooked.efi | default(false) %}
+ path: {{ install.disks.primary }}
+{% if install.efi | default(false) %}
ptable: gpt
{% else %}
ptable: msdos
@@ -41,11 +41,11 @@ autoinstall:
{% endif %}
wipe: superblock-recursive
{% else %}
-{% for raid_member in install_cooked.disks.raid.members %}
+{% for raid_member in install.disks.raid.members %}
- id: raid-disk{{ loop.index }}
type: disk
path: {{ raid_member }}
-{% if install_cooked.efi | default(false) %}
+{% if install.efi | default(false) %}
ptable: gpt
{% else %}
ptable: msdos
@@ -55,9 +55,9 @@ autoinstall:
{% endfor %}
{% endif %}
-{% if install_cooked.efi | default(false) %}
+{% if install.efi | default(false) %}
{% set part_offset = 1 %}
-{% if install_cooked.disks.primary != "software-raid" %}
+{% if install.disks.primary != "software-raid" %}
- id: partition-esp
type: partition
device: disk-primary
@@ -75,7 +75,7 @@ autoinstall:
device: format-esp
path: /boot/efi
{% else %}
-{% for raid_member in install_cooked.disks.raid.members %}
+{% for raid_member in install.disks.raid.members %}
- id: partition-esp{{ loop.index }}
type: partition
device: raid-disk{{ loop.index }}
@@ -98,8 +98,8 @@ autoinstall:
{% else %}
{% set part_offset = 0 %}
{% endif %}
-{% if install_cooked.disks.primary == "software-raid" %}
-{% for raid_member in install_cooked.disks.raid.members %}
+{% if install.disks.primary == "software-raid" %}
+{% for raid_member in install.disks.raid.members %}
- id: raid-partition-boot{{ loop.index }}
type: partition
device: raid-disk{{ loop.index }}
@@ -109,9 +109,9 @@ autoinstall:
- id: partition-boot
type: raid
name: md-boot
- raidlevel: {{ install_cooked.disks.raid.level }}
+ raidlevel: {{ install.disks.raid.level }}
devices:
-{% for raid_member in install_cooked.disks.raid.members %}
+{% for raid_member in install.disks.raid.members %}
- raid-partition-boot{{ loop.index }}
{% endfor %}
- id: format-boot
@@ -125,9 +125,9 @@ autoinstall:
{% set part_offset = part_offset + 1 %}
{% endif %}
-{% set system_lvm_size = install_cooked.system_lvm.size | default(ubuntu_autoinstall_system_lvm_size_default) %}
-{% set system_lvm_volumes = install_cooked.system_lvm.volumes | default(ubuntu_autoinstall_system_lvm_volumes_default) %}
-{% if install_cooked.disks.primary != "software-raid" %}
+{% set system_lvm_size = install.system_lvm.size | default(ubuntu_autoinstall_system_lvm_size_default) %}
+{% set system_lvm_volumes = install.system_lvm.volumes | default(ubuntu_autoinstall_system_lvm_volumes_default) %}
+{% if install.disks.primary != "software-raid" %}
- id: partition-lvm
type: partition
device: disk-primary
@@ -144,7 +144,7 @@ autoinstall:
size: -1
{% else %}
-{% for raid_member in install_cooked.disks.raid.members %}
+{% for raid_member in install.disks.raid.members %}
- id: raid-partition-lvm{{ loop.index }}
type: partition
device: raid-disk{{ loop.index }}
@@ -162,9 +162,9 @@ autoinstall:
- id: partition-lvm
type: raid
name: md-lvm
- raidlevel: {{ install_cooked.disks.raid.level }}
+ raidlevel: {{ install.disks.raid.level }}
devices:
-{% for raid_member in install_cooked.disks.raid.members %}
+{% for raid_member in install.disks.raid.members %}
- raid-partition-lvm{{ loop.index }}
{% endfor %}
@@ -239,7 +239,7 @@ autoinstall:
{% endif %}
- curtin in-target --target=/target -- apt-mark manual iputils-ping isc-dhcp-client netcat-openbsd netplan.io sudo
- curtin in-target --target=/target -- apt-get -y -q purge policykit-1 multipath-tools ubuntu-minimal unattended-upgrades sound-theme-freedesktop thin-provisioning-tools cryptsetup byobu open-iscsi btrfs-progs pollinate lxd-agent-loader open-vm-tools
-{% if install_cooked.disks.primary != "software-raid" %}
+{% if install.disks.primary != "software-raid" %}
- curtin in-target --target=/target -- apt-get -y -q purge mdadm
{% endif %}
- curtin in-target --target=/target -- env SUDO_FORCE_REMOVE=yes apt-get -y -q purge sudo
diff --git a/roles/installer/ubuntu/iso/tasks/main.yml b/roles/installer/ubuntu/iso/tasks/main.yml
index ecfc2265..be46d923 100644
--- a/roles/installer/ubuntu/iso/tasks/main.yml
+++ b/roles/installer/ubuntu/iso/tasks/main.yml
@@ -3,7 +3,7 @@
run_once: true
vars:
ubuntu_installer_codename: "{{ install_codename }}"
- ubuntu_installer_arch: "{{ install_cooked.arch | default('amd64') }}"
+ ubuntu_installer_arch: "{{ install.arch | default('amd64') }}"
ubuntu_installer_variant: "{{ ubuntu_installer_iso_variant }}"
import_role:
role: installer/ubuntu/fetch
diff --git a/roles/installer/ubuntu/iso/templates/grub.cfg.j2 b/roles/installer/ubuntu/iso/templates/grub.cfg.j2
index ccbc25eb..74d7709e 100644
--- a/roles/installer/ubuntu/iso/templates/grub.cfg.j2
+++ b/roles/installer/ubuntu/iso/templates/grub.cfg.j2
@@ -13,6 +13,6 @@ set default=0
menuentry "automated installer for {{ inventory_hostname }}" {
set gfxpayload=keep
- linux /casper/vmlinuz quiet nopersistent autoinstall "ds=nocloud;s=/cdrom/autoinstall/{{ inventory_hostname }}/" {{ (install_cooked.kernel_cmdline | default([])) | join(' ') }}
+ linux /casper/vmlinuz quiet nopersistent autoinstall "ds=nocloud;s=/cdrom/autoinstall/{{ inventory_hostname }}/" {{ (install.kernel_cmdline | default([])) | join(' ') }}
initrd /casper/initrd
}
diff --git a/roles/installer/ubuntu/iso/templates/isolinux.cfg.j2 b/roles/installer/ubuntu/iso/templates/isolinux.cfg.j2
index 99401b8b..b407b149 100644
--- a/roles/installer/ubuntu/iso/templates/isolinux.cfg.j2
+++ b/roles/installer/ubuntu/iso/templates/isolinux.cfg.j2
@@ -12,4 +12,4 @@ SAY **
LABEL {{ inventory_hostname }}
KERNEL /casper/vmlinuz
INITRD /casper/initrd
- APPEND quiet nopersistent autoinstall ds=nocloud;s=/cdrom/autoinstall/{{ inventory_hostname }}/ {{ (install_cooked.kernel_cmdline | default([])) | join(' ') }}
+ APPEND quiet nopersistent autoinstall ds=nocloud;s=/cdrom/autoinstall/{{ inventory_hostname }}/ {{ (install.kernel_cmdline | default([])) | join(' ') }}
diff --git a/roles/installer/ubuntu/usb/tasks/main.yml b/roles/installer/ubuntu/usb/tasks/main.yml
index c7eb9e41..94b7c316 100644
--- a/roles/installer/ubuntu/usb/tasks/main.yml
+++ b/roles/installer/ubuntu/usb/tasks/main.yml
@@ -15,7 +15,7 @@
run_once: true
vars:
ubuntu_installer_codename: "{{ install_codename }}"
- ubuntu_installer_arch: "{{ install_cooked.arch | default('amd64') }}"
+ ubuntu_installer_arch: "{{ install.arch | default('amd64') }}"
ubuntu_installer_variant: "{{ ubuntu_installer_usb_variant }}"
import_role:
role: installer/ubuntu/fetch
diff --git a/roles/installer/ubuntu/usb/templates/grub.cfg.j2 b/roles/installer/ubuntu/usb/templates/grub.cfg.j2
index adeb5672..8282e95c 100644
--- a/roles/installer/ubuntu/usb/templates/grub.cfg.j2
+++ b/roles/installer/ubuntu/usb/templates/grub.cfg.j2
@@ -16,7 +16,7 @@ set default=0
menuentry "automated installer for {{ host }}" {
set gfxpayload=keep
- linux /casper/vmlinuz quiet nopersistent autoinstall "ds=nocloud;s=/cdrom/autoinstall/{{ host }}/" {{ (hostvars[host].install_cooked.kernel_cmdline | default([])) | join(' ') }}
+ linux /casper/vmlinuz quiet nopersistent autoinstall "ds=nocloud;s=/cdrom/autoinstall/{{ host }}/" {{ (hostvars[host].install.kernel_cmdline | default([])) | join(' ') }}
initrd /casper/initrd
}
{% endfor %}
diff --git a/roles/installer/ubuntu/usb/templates/isolinux.cfg.j2 b/roles/installer/ubuntu/usb/templates/isolinux.cfg.j2
index 03d581d4..12e7179d 100644
--- a/roles/installer/ubuntu/usb/templates/isolinux.cfg.j2
+++ b/roles/installer/ubuntu/usb/templates/isolinux.cfg.j2
@@ -21,5 +21,5 @@ LABEL {{ host }}
MENU LABEL automated installer for {{ host }}
KERNEL /casper/vmlinuz
INITRD /casper/initrd
- APPEND quiet nopersistent autoinstall ds=nocloud;s=/cdrom/autoinstall/{{ host }}/ {{ (hostvars[host].install_cooked.kernel_cmdline | default([])) | join(' ') }}
+ APPEND quiet nopersistent autoinstall ds=nocloud;s=/cdrom/autoinstall/{{ host }}/ {{ (hostvars[host].install.kernel_cmdline | default([])) | join(' ') }}
{% endfor %}
diff --git a/roles/kubernetes/kubeadm/base/templates/net_kubeguard/peer.service.j2 b/roles/kubernetes/kubeadm/base/templates/net_kubeguard/peer.service.j2
index c9d96a5a..a119dd0d 100644
--- a/roles/kubernetes/kubeadm/base/templates/net_kubeguard/peer.service.j2
+++ b/roles/kubernetes/kubeadm/base/templates/net_kubeguard/peer.service.j2
@@ -14,7 +14,7 @@ After=kubeguard-interface.service
{% else %}
{% set tun_ip = kubernetes.pod_ip_range | ipsubnet(kubernetes.pod_ip_range_size, 0) | ipaddr(kubeguard.node_index[peer]) -%}
{% set wg_pubkey = hostvars[peer].kubeguard_wireguard_pubkey.stdout -%}
-{% set wg_host = hostvars[peer].external_ip_cooked | default(hostvars[peer].ansible_default_ipv4.address) -%}
+{% set wg_host = hostvars[peer].external_ip | default(hostvars[peer].ansible_default_ipv4.address) -%}
{% set wg_port = hostvars[peer].kubeguard_wireguard_port | default(51820) -%}
{% set wg_allowedips = (tun_ip | ipaddr('address')) + "/32," + pod_net_peer %}
{% endif %}
diff --git a/roles/kubernetes/kubeadm/master/templates/encryption-config.j2 b/roles/kubernetes/kubeadm/master/templates/encryption-config.j2
index b0e700b2..345c9bf9 100644
--- a/roles/kubernetes/kubeadm/master/templates/encryption-config.j2
+++ b/roles/kubernetes/kubeadm/master/templates/encryption-config.j2
@@ -6,7 +6,7 @@ resources:
providers:
- secretbox:
keys:
-{% for key in kubernetes_secrets_cooked.encryption_config_keys %}
+{% for key in kubernetes_secrets.encryption_config_keys %}
- name: key{{ loop.index }}
secret: {{ key }}
{% endfor %}
diff --git a/roles/vm/guest/base/tasks/Debian.yml b/roles/vm/guest/base/tasks/Debian.yml
index 7a383fe1..74778d8e 100644
--- a/roles/vm/guest/base/tasks/Debian.yml
+++ b/roles/vm/guest/base/tasks/Debian.yml
@@ -40,7 +40,7 @@
content: |
[Service]
ExecStart=
- ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 --noclear --autologin root --login-pause --host {{ vm_host_cooked.name }} %I $TERM
+ ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 --noclear --autologin root --login-pause --host {{ vm_host.name }} %I $TERM
- name: enable serial console in grub and for kernel
diff --git a/roles/vm/guest/define/defaults/main.yml b/roles/vm/guest/define/defaults/main.yml
index 05aeaab6..f0c74831 100644
--- a/roles/vm/guest/define/defaults/main.yml
+++ b/roles/vm/guest/define/defaults/main.yml
@@ -1,5 +1,5 @@
---
-vm_define_autostart: "{{ not vm_define_installer and install_cooked.vm.autostart | default(False) }}"
+vm_define_autostart: "{{ not vm_define_installer and install.vm.autostart | default(False) }}"
vm_define_start: yes
vm_define_installer: no
diff --git a/roles/vm/guest/define/tasks/main.yml b/roles/vm/guest/define/tasks/main.yml
index a4405de1..769afdac 100644
--- a/roles/vm/guest/define/tasks/main.yml
+++ b/roles/vm/guest/define/tasks/main.yml
@@ -1,6 +1,6 @@
---
- name: check if vm already exists
- delegate_to: "{{ vm_host_cooked.name }}"
+ delegate_to: "{{ vm_host.name }}"
virt:
name: "{{ inventory_hostname }}"
command: info
@@ -8,7 +8,7 @@
- name: remove old vm
when: inventory_hostname in vmhost_info
- delegate_to: "{{ vm_host_cooked.name }}"
+ delegate_to: "{{ vm_host.name }}"
block:
- name: destroy exisiting vm
virt:
@@ -27,14 +27,14 @@
command: undefine
- name: define vm
- delegate_to: "{{ vm_host_cooked.name }}"
+ delegate_to: "{{ vm_host.name }}"
virt:
command: define
xml: "{{ lookup('template', 'libvirt-domain.xml.j2') }}"
- name: start new vm
when: vm_define_start | bool
- delegate_to: "{{ vm_host_cooked.name }}"
+ delegate_to: "{{ vm_host.name }}"
block:
- name: start vm
virt:
@@ -48,7 +48,7 @@
timeout: 10
- name: mark vm as autostarted
- delegate_to: "{{ vm_host_cooked.name }}"
+ delegate_to: "{{ vm_host.name }}"
virt:
name: "{{ inventory_hostname }}"
autostart: "{{ vm_define_autostart }}"
diff --git a/roles/vm/guest/define/templates/libvirt-domain.xml.j2 b/roles/vm/guest/define/templates/libvirt-domain.xml.j2
index 2287dd0b..0430229b 100644
--- a/roles/vm/guest/define/templates/libvirt-domain.xml.j2
+++ b/roles/vm/guest/define/templates/libvirt-domain.xml.j2
@@ -1,8 +1,8 @@
<domain type='kvm'>
<name>{{ inventory_hostname }}</name>
- <memory>{{ ((install_cooked.vm.memory | human_to_bytes) / 1024) | int }}</memory>
- <currentMemory>{{ ((install_cooked.vm.memory | human_to_bytes) / 1024) | int }}</currentMemory>
- <vcpu>{{ install_cooked.vm.numcpus }}</vcpu>
+ <memory>{{ ((install.vm.memory | human_to_bytes) / 1024) | int }}</memory>
+ <currentMemory>{{ ((install.vm.memory | human_to_bytes) / 1024) | int }}</currentMemory>
+ <vcpu>{{ install.vm.numcpus }}</vcpu>
<os>
<type arch='x86_64' machine='q35'>hvm</type>
{% if vm_define_installer %}
@@ -50,18 +50,18 @@
</disk>
{% endif %}
-{% if install_cooked.disks %}
-{% if 'scsi' in install_cooked.disks %}
+{% if install.disks %}
+{% if 'scsi' in install.disks %}
<controller type='scsi' index='0' model='virtio-scsi'/>
{% endif %}
{% for bus in ['virtio', 'scsi'] %}
-{% for device, src in (install_cooked.disks[bus] | default({})).items() %}
+{% for device, src in (install.disks[bus] | default({})).items() %}
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none' discard='unmap'/>
{% if src.type == 'lvm' %}
<source dev='/dev/mapper/{{ src.vg | replace('-', '--') }}-{{ src.lv | replace('-', '--') }}'/>
{% elif src.type == 'zfs' %}
- <source dev='/dev/zvol/{{ vm_host_cooked.zfs[src.backend | default('default')].pool }}/{{ vm_host_cooked.zfs[src.backend | default('default')].name }}/{{ inventory_hostname }}/{{ src.name }}'/>
+ <source dev='/dev/zvol/{{ vm_host.zfs[src.backend | default('default')].pool }}/{{ vm_host.zfs[src.backend | default('default')].name }}/{{ inventory_hostname }}/{{ src.name }}'/>
{% elif src.type == 'blockdev' %}
<source dev='{{ src.path }}'/>
{% endif %}
@@ -71,8 +71,8 @@
{% endfor %}
{% endif %}
-{% if install_cooked.interfaces %}
-{% for if in install_cooked.interfaces %}
+{% if install.interfaces %}
+{% for if in install.interfaces %}
<interface type='bridge'>
{% if 'mac' in if %}
<mac address='{{ if.mac }}'/>
diff --git a/roles/vm/guest/install/tasks/installer-debian.yml b/roles/vm/guest/install/tasks/installer-debian.yml
index 80d41647..8a5c0120 100644
--- a/roles/vm/guest/install/tasks/installer-debian.yml
+++ b/roles/vm/guest/install/tasks/installer-debian.yml
@@ -2,10 +2,10 @@
## this file is sourced using import_task and all task are therefore delegated to the vm-host
- name: fetch debian installer files
vars:
- installer_base_path: "{{ hostvars[vm_host_cooked.name].installer_base_path }}"
+ installer_base_path: "{{ hostvars[vm_host.name].installer_base_path }}"
debian_installer_distro: "{{ install_distro }}"
debian_installer_codename: "{{ install_codename }}"
- debian_installer_arch: "{{ install_cooked.arch | default('amd64') }}"
+ debian_installer_arch: "{{ install.arch | default('amd64') }}"
debian_installer_variant: netboot
import_role:
name: installer/debian/fetch
diff --git a/roles/vm/guest/install/tasks/installer-openbsd.yml b/roles/vm/guest/install/tasks/installer-openbsd.yml
index 903e94e2..e3e05fb4 100644
--- a/roles/vm/guest/install/tasks/installer-openbsd.yml
+++ b/roles/vm/guest/install/tasks/installer-openbsd.yml
@@ -2,18 +2,18 @@
## this file is sourced using import_task and all task are therefore delegated to the vm-host
- name: fetch openbsd installer files
vars:
- installer_base_path: "{{ hostvars[vm_host_cooked.name].installer_base_path }}"
+ installer_base_path: "{{ hostvars[vm_host.name].installer_base_path }}"
openbsd_installer_version: "{{ install_codename }}"
- openbsd_installer_arch: "{{ install_cooked.arch | default('amd64') }}"
+ openbsd_installer_arch: "{{ install.arch | default('amd64') }}"
import_role:
name: installer/openbsd/fetch
- name: generate host specific autoinstall iso
vars:
- obsd_autoinstall_orig_iso: "{{ hostvars[vm_host_cooked.name].installer_base_path }}/openbsd-{{ install_codename }}/{{ install_cooked.arch | default('amd64') }}/install{{ openbsd_installer_version_short }}.iso"
+ obsd_autoinstall_orig_iso: "{{ hostvars[vm_host.name].installer_base_path }}/openbsd-{{ install_codename }}/{{ install.arch | default('amd64') }}/install{{ openbsd_installer_version_short }}.iso"
obsd_autoinstall_tmpdir: "{{ tmpdir.path }}"
obsd_autoinstall_version: "{{ install_codename }}"
- obsd_autoinstall_arch: "{{ install_cooked.arch | default('amd64') }}"
+ obsd_autoinstall_arch: "{{ install.arch | default('amd64') }}"
obsd_autoinstall_serial_device: com0
install_interface: vio0
import_role:
diff --git a/roles/vm/guest/install/tasks/main.yml b/roles/vm/guest/install/tasks/main.yml
index 06987bc3..f2bd5362 100644
--- a/roles/vm/guest/install/tasks/main.yml
+++ b/roles/vm/guest/install/tasks/main.yml
@@ -1,9 +1,9 @@
---
- name: create lvm-based disks for vm
- loop: "{{ install_cooked.disks.virtio | default({}) | combine(install_cooked.disks.scsi | default({})) | dict2items | selectattr('value.type', 'eq', 'lvm') | list }}"
+ loop: "{{ install.disks.virtio | default({}) | combine(install.disks.scsi | default({})) | dict2items | selectattr('value.type', 'eq', 'lvm') | list }}"
loop_control:
label: "{{ item.value.vg }} / {{ item.value.lv }} ({{ item.value.size }})"
- delegate_to: "{{ vm_host_cooked.name }}"
+ delegate_to: "{{ vm_host.name }}"
lvol:
vg: "{{ item.value.vg }}"
lv: "{{ item.value.lv }}"
@@ -11,31 +11,31 @@
state: present
- name: create zfs base datasets for vm
- loop: "{{ install_cooked.disks.virtio | default({}) | combine(install_cooked.disks.scsi | default({})) | dict2items | selectattr('value.type', 'eq', 'zfs') | map(attribute='value.backend') | map('default', 'default') | unique | list }}"
- delegate_to: "{{ vm_host_cooked.name }}"
+ loop: "{{ install.disks.virtio | default({}) | combine(install.disks.scsi | default({})) | dict2items | selectattr('value.type', 'eq', 'zfs') | map(attribute='value.backend') | map('default', 'default') | unique | list }}"
+ delegate_to: "{{ vm_host.name }}"
zfs:
- name: "{{ vm_host_cooked.zfs[item].pool }}/{{ vm_host_cooked.zfs[item].name }}/{{ inventory_hostname }}"
+ name: "{{ vm_host.zfs[item].pool }}/{{ vm_host.zfs[item].name }}/{{ inventory_hostname }}"
state: present
extra_zfs_properties:
canmount: no
mountpoint: none
- name: create zfs-based disk volumes for vm
- loop: "{{ install_cooked.disks.virtio | default({}) | combine(install_cooked.disks.scsi | default({})) | dict2items | selectattr('value.type', 'eq', 'zfs') | list }}"
+ loop: "{{ install.disks.virtio | default({}) | combine(install.disks.scsi | default({})) | dict2items | selectattr('value.type', 'eq', 'zfs') | list }}"
loop_control:
label: "{{ item.value.name }} on backend {{ item.value.backend | default('default') }} ({{ item.value.size }})"
- delegate_to: "{{ vm_host_cooked.name }}"
+ delegate_to: "{{ vm_host.name }}"
zfs:
- name: "{{ vm_host_cooked.zfs[item.value.backend | default('default')].pool }}/{{ vm_host_cooked.zfs[item.value.backend | default('default')].name }}/{{ inventory_hostname }}/{{ item.value.name }}"
+ name: "{{ vm_host.zfs[item.value.backend | default('default')].pool }}/{{ vm_host.zfs[item.value.backend | default('default')].name }}/{{ inventory_hostname }}/{{ item.value.name }}"
state: present
extra_zfs_properties: "{{ item.value.properties | default({}) | combine({'volsize': item.value.size}) | dehumanize_zfs_properties }}"
-- delegate_to: "{{ vm_host_cooked.name }}"
+- delegate_to: "{{ vm_host.name }}"
block:
- name: create a temporary workdir
tempfile:
- path: "{{ hostvars[vm_host_cooked.name].installer_base_path }}/"
+ path: "{{ hostvars[vm_host.name].installer_base_path }}/"
prefix: ".{{ inventory_hostname }}."
state: directory
register: tmpdir
@@ -62,7 +62,7 @@
name: vm/guest/define
- debug:
- msg: "you can check on the status of the installer running this command 'virsh console {{ inventory_hostname }}' on host {{ vm_host_cooked.name }}."
+ msg: "you can check on the status of the installer running this command 'virsh console {{ inventory_hostname }}' on host {{ vm_host.name }}."
- when: installer_manual_steps_msg is defined
pause:
@@ -90,6 +90,6 @@
- name: define vm
vars:
vm_define_installer: no
- delegate_to: "{{ vm_host_cooked.name }}"
+ delegate_to: "{{ vm_host.name }}"
import_role:
name: vm/guest/define
diff --git a/roles/vm/guest/network/tasks/Debian.yml b/roles/vm/guest/network/tasks/Debian.yml
index 27a7682a..1b785ee5 100644
--- a/roles/vm/guest/network/tasks/Debian.yml
+++ b/roles/vm/guest/network/tasks/Debian.yml
@@ -1,6 +1,6 @@
---
- name: configure systemd link units
- when: network_cooked.systemd_link is defined
+ when: network.systemd_link is defined
block:
- name: remove legacy systemd.link units
loop:
@@ -11,7 +11,7 @@
state: absent
- name: install systemd network link units
- loop: "{{ network_cooked.systemd_link.interfaces }}"
+ loop: "{{ network.systemd_link.interfaces }}"
loop_control:
label: "{{ item.name }}"
index_var: interface_index
diff --git a/roles/vm/guest/network/tasks/OpenBSD.yml b/roles/vm/guest/network/tasks/OpenBSD.yml
index 4357ea4e..ac31af55 100644
--- a/roles/vm/guest/network/tasks/OpenBSD.yml
+++ b/roles/vm/guest/network/tasks/OpenBSD.yml
@@ -1,6 +1,6 @@
---
- name: generate network interface configs
- loop: "{{ network_cooked.interfaces }}"
+ loop: "{{ network.interfaces }}"
loop_control:
loop_var: interface
label: "{{ interface.name }}"
diff --git a/roles/vm/guest/network/templates/interfaces.j2 b/roles/vm/guest/network/templates/interfaces.j2
index c8ff5b94..02442a57 100644
--- a/roles/vm/guest/network/templates/interfaces.j2
+++ b/roles/vm/guest/network/templates/interfaces.j2
@@ -6,7 +6,7 @@ source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
-{% for interface in network_cooked.interfaces %}
+{% for interface in network.interfaces %}
auto {{ interface.name }}
diff --git a/roles/vm/guest/network/templates/resolv.conf.j2 b/roles/vm/guest/network/templates/resolv.conf.j2
index 00aaafe3..a32ec181 100644
--- a/roles/vm/guest/network/templates/resolv.conf.j2
+++ b/roles/vm/guest/network/templates/resolv.conf.j2
@@ -1,4 +1,4 @@
-{% for nsrv in network_cooked.nameservers %}
+{% for nsrv in network.nameservers %}
nameserver {{ nsrv }}
{% endfor %}
-search {{ network_cooked.domain }}
+search {{ network.domain }}
diff --git a/spreadspace/cloud-install.yml b/spreadspace/cloud-install.yml
index 31c757a1..1a7b26c0 100644
--- a/spreadspace/cloud-install.yml
+++ b/spreadspace/cloud-install.yml
@@ -4,7 +4,7 @@
gather_facts: no
tasks:
- set_fact:
- install_cooked: "{{ install }}"
- network_cooked: "{{ network }}"
+ install: "{{ install }}"
+ network: "{{ network }}"
- import_playbook: ../common/cloud-install.yml
diff --git a/spreadspace/generic.yml b/spreadspace/generic.yml
index 9a495ffb..bc8866c5 100644
--- a/spreadspace/generic.yml
+++ b/spreadspace/generic.yml
@@ -1,11 +1,5 @@
---
- name: "Apply role {{ myrole }} to hosts: {{ myhosts }}"
hosts: "{{ myhosts }}"
- pre_tasks:
- - name: cook some variables for roles that expect them to be cooked
- set_fact:
- install_cooked: "{{ install | default({}) }}"
- network_cooked: "{{ network | default({}) }}"
- vm_host_cooked: "{{ vm_host | default({}) }}"
roles:
- role: "{{ myrole }}"
diff --git a/spreadspace/iso-generate.yml b/spreadspace/iso-generate.yml
index 2f0c8345..59a077ae 100644
--- a/spreadspace/iso-generate.yml
+++ b/spreadspace/iso-generate.yml
@@ -4,7 +4,7 @@
gather_facts: no
tasks:
- set_fact:
- install_cooked: "{{ install }}"
- network_cooked: "{{ network }}"
+ install: "{{ install }}"
+ network: "{{ network }}"
- import_playbook: ../common/iso-generate.yml
diff --git a/spreadspace/iso-install.yml b/spreadspace/iso-install.yml
index 0ae125a2..91dfca9e 100644
--- a/spreadspace/iso-install.yml
+++ b/spreadspace/iso-install.yml
@@ -4,7 +4,7 @@
gather_facts: no
tasks:
- set_fact:
- install_cooked: "{{ install }}"
- network_cooked: "{{ network }}"
+ install: "{{ install }}"
+ network: "{{ network }}"
- import_playbook: ../common/iso-install.yml
diff --git a/spreadspace/k8s-lwl.yml b/spreadspace/k8s-lwl.yml
index 01801633..1aa09daa 100644
--- a/spreadspace/k8s-lwl.yml
+++ b/spreadspace/k8s-lwl.yml
@@ -20,10 +20,10 @@
gather_facts: no
tasks:
- set_fact:
- kubernetes_secrets_cooked: "{{ kubernetes_secrets }}"
+ kubernetes_secrets: "{{ kubernetes_secrets }}"
- when: external_ip is defined
set_fact:
- external_ip_cooked: "{{ external_ip }}"
+ external_ip: "{{ external_ip }}"
- import_playbook: ../common/kubernetes-cluster.yml
- import_playbook: ../common/kubernetes-cluster-cleanup.yml
diff --git a/spreadspace/usb-generate.yml b/spreadspace/usb-generate.yml
index 3340d93b..12582abe 100644
--- a/spreadspace/usb-generate.yml
+++ b/spreadspace/usb-generate.yml
@@ -4,7 +4,7 @@
gather_facts: no
tasks:
- set_fact:
- install_cooked: "{{ install }}"
- network_cooked: "{{ network }}"
+ install: "{{ install }}"
+ network: "{{ network }}"
- import_playbook: ../common/usb-generate.yml
diff --git a/spreadspace/usb-install.yml b/spreadspace/usb-install.yml
index 04bf2594..ae948707 100644
--- a/spreadspace/usb-install.yml
+++ b/spreadspace/usb-install.yml
@@ -4,7 +4,7 @@
gather_facts: no
tasks:
- set_fact:
- install_cooked: "{{ install }}"
- network_cooked: "{{ network }}"
+ install: "{{ install }}"
+ network: "{{ network }}"
- import_playbook: ../common/usb-install.yml
diff --git a/spreadspace/vm-install.yml b/spreadspace/vm-install.yml
index 7d8e7320..7db00cba 100644
--- a/spreadspace/vm-install.yml
+++ b/spreadspace/vm-install.yml
@@ -4,8 +4,8 @@
gather_facts: no
tasks:
- set_fact:
- install_cooked: "{{ install }}"
- network_cooked: "{{ network }}"
- vm_host_cooked: "{{ vm_host }}"
+ install: "{{ install }}"
+ network: "{{ network }}"
+ vm_host: "{{ vm_host }}"
- import_playbook: ../common/vm-install.yml