From 17077868e615fa7115abdb03a5af4662ab0a3679 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 23 Apr 2020 01:24:38 +0200 Subject: refactor all install roles ans playbooks to work with new variable install_hostname --- roles/cloud/install/templates/hetzner_postinst.sh.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'roles/cloud/install') diff --git a/roles/cloud/install/templates/hetzner_postinst.sh.j2 b/roles/cloud/install/templates/hetzner_postinst.sh.j2 index ac357db6..39a3fd7d 100644 --- a/roles/cloud/install/templates/hetzner_postinst.sh.j2 +++ b/roles/cloud/install/templates/hetzner_postinst.sh.j2 @@ -16,8 +16,8 @@ mkdir -p -m 0700 /target/root/.ssh cat < /root/.ssh/authorized_keys {{ ssh_keys_root | join('\n') }} EOK -{% if hostvars[hostname].ansible_port is defined %} -sed -e 's/^\(\s*#*\s*Port.*\)/Port {{ hostvars[hostname].ansible_port }}/' -i /etc/ssh/sshd_config +{% 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 {% endif %} {# this is actually only needed on ubuntu bionic and beyond but should not hurt on other installations either #} -- cgit v1.2.3