diff options
Diffstat (limited to 'roles/cloud/install')
-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 #} |