diff options
author | Christian Pointner <equinox@spreadspace.org> | 2020-11-21 03:42:54 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2020-11-21 03:42:54 +0100 |
commit | 8828d4e11c28da88d65e45014431361aabb0c3d5 (patch) | |
tree | 759456a48196e108cf35bab4f1c6a774e8c20170 /roles/cloud/install/templates | |
parent | add some vmhost test machines (diff) |
use delegation for vm/guest install and define
Diffstat (limited to 'roles/cloud/install/templates')
-rw-r--r-- | roles/cloud/install/templates/hetzner_postinst.sh.j2 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/roles/cloud/install/templates/hetzner_postinst.sh.j2 b/roles/cloud/install/templates/hetzner_postinst.sh.j2 index ad701364..8f923313 100644 --- a/roles/cloud/install/templates/hetzner_postinst.sh.j2 +++ b/roles/cloud/install/templates/hetzner_postinst.sh.j2 @@ -33,8 +33,8 @@ mkdir -p -m 0700 /target/root/.ssh cat <<EOK > /root/.ssh/authorized_keys {{ ssh_keys_root | join('\n') }} EOK -{% if hostvars[install_hostname].ansible_port is defined %} -sed -e 's/^\(\s*#*\s*Port.*\)/Port {{ hostvars[install_hostname].ansible_port }}/' -i /etc/ssh/sshd_config +{% if ansible_port is defined %} +sed -e 's/^\(\s*#*\s*Port.*\)/Port {{ ansible_port }}/' -i /etc/ssh/sshd_config {% endif %} {# this is actually only needed on ubuntu bionic and beyond but should not hurt on other installations either #} |