summaryrefslogtreecommitdiff
path: root/roles/cloud/install/templates/hetzner_installimage.conf.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/cloud/install/templates/hetzner_installimage.conf.j2')
-rw-r--r--roles/cloud/install/templates/hetzner_installimage.conf.j216
1 files changed, 7 insertions, 9 deletions
diff --git a/roles/cloud/install/templates/hetzner_installimage.conf.j2 b/roles/cloud/install/templates/hetzner_installimage.conf.j2
index 0881b110..ed22f286 100644
--- a/roles/cloud/install/templates/hetzner_installimage.conf.j2
+++ b/roles/cloud/install/templates/hetzner_installimage.conf.j2
@@ -1,15 +1,13 @@
HOSTNAME {{ host_name }}{% if host_domain %}.{{ host_domain }}{% endif %}{{ '' }}
{% if cloud_provider == "hroot" %}
-{% if install_cooked.disks.layout == "nvme_raid" %}
-DRIVE1 /dev/nvme0n1
-DRIVE2 /dev/nvme1n1
+{% if install_cooked.disks.primary == "software-raid" %}
+{% for raid_member in install_cooked.disks.raid.members %}
+DRIVE{{ loop.index }} {{ raid_member }}
+{% endfor %}
SWRAID 1
-SWRAIDLEVEL 1
-{% elif install_cooked.disks.layout == "sata_raid" %}
-DRIVE1 /dev/sda
-DRIVE2 /dev/sdb
-SWRAID 1
-SWRAIDLEVEL 1
+SWRAIDLEVEL {{ install_cooked.disks.raid.level }}
+{% else %}
+DRIVE1 {{ install_cooked.disks.primary }}
{% endif %}
{% elif cloud_provider == "hcloud" %}
DRIVE1 /dev/sda