Add Longhorn and make it possible to enable/disable it and the hetzner csi

This commit is contained in:
Michael Karbowiak
2022-05-02 16:21:18 +02:00
parent 56ff30199d
commit f905b68e7c
5 changed files with 89 additions and 14 deletions

View File

@@ -69,7 +69,7 @@ resource "hcloud_server" "server" {
provisioner "remote-exec" {
inline = [
"set -ex",
"transactional-update shell <<< 'rpm --import https://rpm.rancher.io/public.key;zypper install -y https://github.com/k3s-io/k3s-selinux/releases/download/v0.5.stable.1/k3s-selinux-0.5-1.sle.noarch.rpm'"
"transactional-update shell <<< 'rpm --import https://rpm.rancher.io/public.key; zypper install -y open-iscsi https://github.com/k3s-io/k3s-selinux/releases/download/v0.5.stable.1/k3s-selinux-0.5-1.sle.noarch.rpm'"
]
}
@@ -84,6 +84,14 @@ resource "hcloud_server" "server" {
done
EOT
}
# Enable open-iscsi
provisioner "remote-exec" {
inline = [
"set -ex",
"systemctl enable --now iscsid"
]
}
}
resource "hcloud_server_network" "server" {