summaryrefslogtreecommitdiff
path: root/roles/installer/openbsd
diff options
context:
space:
mode:
Diffstat (limited to 'roles/installer/openbsd')
-rw-r--r--roles/installer/openbsd/autoinstall/defaults/main.yml2
-rw-r--r--roles/installer/openbsd/autoinstall/templates/auto_install.conf.j216
-rw-r--r--roles/installer/openbsd/autoinstall/templates/install.site.j26
3 files changed, 12 insertions, 12 deletions
diff --git a/roles/installer/openbsd/autoinstall/defaults/main.yml b/roles/installer/openbsd/autoinstall/defaults/main.yml
index cdea194e..27f7221a 100644
--- a/roles/installer/openbsd/autoinstall/defaults/main.yml
+++ b/roles/installer/openbsd/autoinstall/defaults/main.yml
@@ -1,7 +1,7 @@
---
# obsd_autoinstall_tmpdir:
-obsd_autoinstall_arch: "{{ hostvars[hostname].install_cooked.arch | default('amd64') }}"
+obsd_autoinstall_arch: "{{ hostvars[install_hostname].install_cooked.arch | default('amd64') }}"
obsd_autoinstall_version: "{{ install_codename }}"
obsd_autoinstall_version_short: "{{ obsd_autoinstall_version | replace('.', '') }}"
diff --git a/roles/installer/openbsd/autoinstall/templates/auto_install.conf.j2 b/roles/installer/openbsd/autoinstall/templates/auto_install.conf.j2
index 18e85a80..4220be38 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[hostname].host_name }}
+System hostname = {{ hostvars[install_hostname].host_name }}
-Which network interface do you wish to configure = {{ install_interface | default(hostvars[hostname].network_cooked.primary.interface) }}
-{% if 'install_dhcp' in hostvars[hostname] and hostvars[hostname].install_dhcp %}
+Which network interface do you wish to configure = {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.interface) }}
+{% if 'install_dhcp' in hostvars[install_hostname] and hostvars[install_hostname].install_dhcp %}
IPv4 address = dhcp
{% else %}
-IPv4 address = {{ hostvars[hostname].network_cooked.primary.ip }}
-Netmask = {{ hostvars[hostname].network_cooked.primary.mask }}
-Default IPv4 route = {{ hostvars[hostname].network_cooked.primary.gateway }}
+IPv4 address = {{ hostvars[install_hostname].network_cooked.primary.ip }}
+Netmask = {{ hostvars[install_hostname].network_cooked.primary.mask }}
+Default IPv4 route = {{ hostvars[install_hostname].network_cooked.primary.gateway }}
{% endif %}
-DNS domain name = {{ hostvars[hostname].network_cooked.domain }}
-DNS nameservers = {{ hostvars[hostname].network_cooked.nameservers | join(' ') }}
+DNS domain name = {{ hostvars[install_hostname].network_cooked.domain }}
+DNS nameservers = {{ hostvars[install_hostname].network_cooked.nameservers | join(' ') }}
{% if obsd_autoinstall_serial_device is defined %}
Change the default console to {{ obsd_autoinstall_serial_device }} = yes
diff --git a/roles/installer/openbsd/autoinstall/templates/install.site.j2 b/roles/installer/openbsd/autoinstall/templates/install.site.j2
index 82928daa..974b516a 100644
--- a/roles/installer/openbsd/autoinstall/templates/install.site.j2
+++ b/roles/installer/openbsd/autoinstall/templates/install.site.j2
@@ -8,9 +8,9 @@ cat <<EOF > /root/.ssh/authorized_keys
{{ ssh_keys_root | join('\n') }}
EOF
-{% if hostvars[hostname].ansible_port is defined %}
-echo "Setting SSH port to {{ hostvars[hostname].ansible_port }}"
-sed -e 's/^\(\s*#*\s*Port.*\)/Port {{ hostvars[hostname].ansible_port }}/' -i /etc/ssh/sshd_config
+{% 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
{% endif %}
echo "Installing python"