diff options
author | Christian Pointner <equinox@spreadspace.org> | 2020-05-31 04:11:07 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2020-05-31 04:11:07 +0200 |
commit | 000a5c1501da6575460d96b47e8918a359ff0b49 (patch) | |
tree | db30256fc5833b6b1ab3c37a8f5f56c04e9524fc /roles/cloud/install/templates/hetzner_postinst.sh.j2 | |
parent | add riot-desktop to ch-equinox-ws (diff) |
cloud-install: add ubuntu/focal support
Diffstat (limited to 'roles/cloud/install/templates/hetzner_postinst.sh.j2')
-rw-r--r-- | roles/cloud/install/templates/hetzner_postinst.sh.j2 | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/roles/cloud/install/templates/hetzner_postinst.sh.j2 b/roles/cloud/install/templates/hetzner_postinst.sh.j2 index 39a3fd7d..df1565c7 100644 --- a/roles/cloud/install/templates/hetzner_postinst.sh.j2 +++ b/roles/cloud/install/templates/hetzner_postinst.sh.j2 @@ -1,10 +1,19 @@ #!/bin/bash set -euf -o pipefail +OS_DISTRO=$(. /etc/os-release; echo $ID) +OS_MAJOR_VERSION=$(. /etc/os-release; echo $VERSION_ID | cut -d . -f 1) + export DEBIAN_FRONTEND=noninteractive apt-get update -q apt-get full-upgrade -y -q -apt-get install -y -q --no-install-recommends openssh-server python python-apt +apt-get install -y -q --no-install-recommends openssh-server +if [ "$OS_DISTRO" == "ubuntu" ] && [ "$OS_MAJOR_VERSION" -ge 20 ]; then + apt-get install -y -q --no-install-recommends python3 python3-apt +else + apt-get install -y -q --no-install-recommends python python-apt +fi + passwd -d root && passwd -l root {% if install_distro == "debian" %} |