diff options
Diffstat (limited to 'roles/installer/openbsd/autoinstall')
-rw-r--r-- | roles/installer/openbsd/autoinstall/templates/auto_install.conf.j2 | 18 | ||||
-rw-r--r-- | roles/installer/openbsd/autoinstall/templates/install.site.j2 | 8 |
2 files changed, 13 insertions, 13 deletions
diff --git a/roles/installer/openbsd/autoinstall/templates/auto_install.conf.j2 b/roles/installer/openbsd/autoinstall/templates/auto_install.conf.j2 index 6c23d753..4cfdbfa7 100644 --- a/roles/installer/openbsd/autoinstall/templates/auto_install.conf.j2 +++ b/roles/installer/openbsd/autoinstall/templates/auto_install.conf.j2 @@ -1,15 +1,15 @@ -System hostname = {{ hostvars[install_hostname].host_name }} +System hostname = {{ host_name }} -Which network interface do you wish to configure = {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.name) }} -{% if 'install_dhcp' in hostvars[install_hostname] and hostvars[install_hostname].install_dhcp %} +Which network interface do you wish to configure = {{ install_interface | default(network_cooked.primary.name) }} +{% if (install_dhcp | default(false)) %} IPv4 address = dhcp {% else %} -IPv4 address = {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('address') }} -Netmask = {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('netmask') }} -Default IPv4 route = {{ hostvars[install_hostname].network_cooked.primary.gateway }} +IPv4 address = {{ network_cooked.primary.address | ipaddr('address') }} +Netmask = {{ network_cooked.primary.address | ipaddr('netmask') }} +Default IPv4 route = {{ network_cooked.primary.gateway }} {% endif %} -DNS domain name = {{ hostvars[install_hostname].network_cooked.domain }} -DNS nameservers = {{ hostvars[install_hostname].network_cooked.nameservers | join(' ') }} +DNS domain name = {{ network_cooked.domain }} +DNS nameservers = {{ network_cooked.nameservers | join(' ') }} {% if obsd_autoinstall_serial_device is defined %} Change the default console to {{ obsd_autoinstall_serial_device }} = yes @@ -17,7 +17,7 @@ Which speed should {{ obsd_autoinstall_serial_device }} use = {{ obsd_autoinstal {% endif %} {# we will install only one key for now, install.site will install the rest #} -Public ssh key for root account = {{ hostvars[install_hostname].ssh_keys_root[0] }} +Public ssh key for root account = {{ ssh_keys_root[0] }} Password for root = this-very-very-secure-password-will-be-overwritten-by-install.site Setup a user = no Start sshd(8) by default = yes 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 <<EOF > /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" |