From 8828d4e11c28da88d65e45014431361aabb0c3d5 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 21 Nov 2020 03:42:54 +0100 Subject: use delegation for vm/guest install and define --- roles/installer/openbsd/autoinstall/templates/install.site.j2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'roles/installer/openbsd/autoinstall/templates/install.site.j2') diff --git a/roles/installer/openbsd/autoinstall/templates/install.site.j2 b/roles/installer/openbsd/autoinstall/templates/install.site.j2 index 32b33ea9..ddf53d46 100644 --- a/roles/installer/openbsd/autoinstall/templates/install.site.j2 +++ b/roles/installer/openbsd/autoinstall/templates/install.site.j2 @@ -5,12 +5,12 @@ usermod -p "$(openssl rand -base64 24 | encrypt)" root echo "Installing SSH keys for root" cat < /root/.ssh/authorized_keys -{{ hostvars[install_hostname].ssh_keys_root | join('\n') }} +{{ ssh_keys_root | join('\n') }} EOF -{% if hostvars[install_hostname].ansible_port is defined %} -echo "Setting SSH port to {{ hostvars[install_hostname].ansible_port }}" -sed -e 's/^\(\s*#*\s*Port.*\)/Port {{ hostvars[install_hostname].ansible_port }}/' -i /etc/ssh/sshd_config +{% if ansible_port is defined %} +echo "Setting SSH port to {{ ansible_port }}" +sed -e 's/^\(\s*#*\s*Port.*\)/Port {{ ansible_port }}/' -i /etc/ssh/sshd_config {% endif %} echo "Installing python" -- cgit v1.2.3