summaryrefslogtreecommitdiff
path: root/roles/cloud/install/templates/hetzner_installimage.conf.j2
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2019-09-08 00:20:46 +0200
committerChristian Pointner <equinox@spreadspace.org>2019-09-08 00:20:46 +0200
commitd4dd2f186ea9c5977ea66d3fcc13da8f1553b9d3 (patch)
tree390bafa38d0e7a3864da121aa43b5ca7aa4bd719 /roles/cloud/install/templates/hetzner_installimage.conf.j2
parentdon't autostart testvm (diff)
major refactoring for cloud install
Diffstat (limited to 'roles/cloud/install/templates/hetzner_installimage.conf.j2')
-rw-r--r--roles/cloud/install/templates/hetzner_installimage.conf.j226
1 files changed, 26 insertions, 0 deletions
diff --git a/roles/cloud/install/templates/hetzner_installimage.conf.j2 b/roles/cloud/install/templates/hetzner_installimage.conf.j2
new file mode 100644
index 00000000..a30fb94a
--- /dev/null
+++ b/roles/cloud/install/templates/hetzner_installimage.conf.j2
@@ -0,0 +1,26 @@
+HOSTNAME {{ host_name }}
+{% if cloud_provider == "hroot" %}
+{% if install_cooked.disks.layout == "nvme_raid" %}
+DRIVE1 /dev/nvme0n1
+DRIVE2 /dev/nvme1n1
+SWRAID 1
+SWRAIDLEVEL 1
+{% elif install_cooked.disks.layout == "sata_raid" %}
+DRIVE1 /dev/sda
+DRIVE2 /dev/sdb
+SWRAID 1
+SWRAIDLEVEL 1
+{% endif %}
+{% elif cloud_provider == "hcloud" %}
+DRIVE1 /dev/sda
+{% endif %}
+BOOTLOADER grub
+PART /boot ext4 512M
+PART lvm {{ host_name }} {{ install_cooked.disks.root_lvm_size }}
+{% if install_cooked.disks.root_lvm_size != "all" %}
+PART /dummy ext4 all
+{% endif %}
+LV {{ host_name }} root / ext4 2560M
+LV {{ host_name }} var /var ext4 1280M
+LV {{ host_name }} var+log /var/log ext4 768M
+IMAGE {{ latest_image.stdout }}