summaryrefslogtreecommitdiff
path: root/roles/cloud/install/templates
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-07-22 20:35:59 +0200
committerChristian Pointner <equinox@spreadspace.org>2020-07-22 20:35:59 +0200
commit28ea6d3f7249d85f3190a6fa75a0b45e2b133526 (patch)
treefe493ff6a142bdcd65ccc5f9978fec08b607df44 /roles/cloud/install/templates
parentubuntu: disable splash screen and vt_handoff (diff)
switch to explicit python interpreter handling
Diffstat (limited to 'roles/cloud/install/templates')
-rw-r--r--roles/cloud/install/templates/hetzner_postinst.sh.j211
1 files changed, 3 insertions, 8 deletions
diff --git a/roles/cloud/install/templates/hetzner_postinst.sh.j2 b/roles/cloud/install/templates/hetzner_postinst.sh.j2
index d9de15c9..ad701364 100644
--- a/roles/cloud/install/templates/hetzner_postinst.sh.j2
+++ b/roles/cloud/install/templates/hetzner_postinst.sh.j2
@@ -8,20 +8,15 @@ export DEBIAN_FRONTEND=noninteractive
apt-get update -q
apt-get full-upgrade -y -q
-PYTHON_BASENAME="python"
-if [ "$OS_DISTRO" == "ubuntu" ]; then
- if [ "$OS_MAJOR_VERSION" -ge 20 ]; then PYTHON_BASENAME="python3"; fi
{% if cloud_provider == 'hcloud' %}
+if [ "$OS_DISTRO" == "ubuntu" ]; then
apt-get install -y -q --no-install-recommends linux-image-virtual
apt-get purge -y -q linux-image-generic intel-microcode amd64-microcode iucode-tool linux-firmware
-{% endif %}
elif [ "$OS_DISTRO" == "debian" ]; then
- if [ "$OS_MAJOR_VERSION" -ge 11 ]; then PYTHON_BASENAME="python3"; fi
-{% if cloud_provider == 'hcloud' %}
apt-get purge -y -q intel-microcode amd64-microcode iucode-tool firmware-bnx2x firmware-realtek firmware-linux firmware-linux-free firmware-linux-nonfree
-{% endif %}
fi
-apt-get install -y -q --no-install-recommends openssh-server "$PYTHON_BASENAME" "$PYTHON_BASENAME-apt"
+{% endif %}
+apt-get install -y -q --no-install-recommends openssh-server "{{ python_basename }}" "{{ python_basename }}-apt"
passwd -d root && passwd -l root
{% if install_distro == "debian" %}