summaryrefslogtreecommitdiff
path: root/roles/cloud/install/templates
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 /roles/cloud/install/templates
parentMerge branch 'topic/revamp-openwrt-imag-gen' (diff)
in-place variable cooking
Diffstat (limited to 'roles/cloud/install/templates')
-rw-r--r--roles/cloud/install/templates/hetzner_installimage.conf.j212
-rw-r--r--roles/cloud/install/templates/hetzner_postinst.sh.j24
2 files changed, 8 insertions, 8 deletions
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