aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roles/vmm/tasks/autoinstall_configuration.yml9
-rw-r--r--roles/vmm/templates/autoinstall.conf.j29
2 files changed, 11 insertions, 7 deletions
diff --git a/roles/vmm/tasks/autoinstall_configuration.yml b/roles/vmm/tasks/autoinstall_configuration.yml
index 43c63ff..5d12ee9 100644
--- a/roles/vmm/tasks/autoinstall_configuration.yml
+++ b/roles/vmm/tasks/autoinstall_configuration.yml
@@ -9,7 +9,7 @@
mode: 0700
state: directory
-- name: generate autoinstall files
+- name: generate autoinstall configurations
template: &generation_steps
src: autoinstall.conf.j2
dest: "{{ vmm_autoinstall_dir }}/{{ item.lladdr }}-install.conf"
@@ -19,12 +19,14 @@
when: item.image == "openbsd"
loop: "{{ vmm_vms }}"
-- name: generate autoupgrade files
+- name: generate autoupgrade configurations
template:
<<: *generation_steps
dest: "{{ vmm_autoinstall_dir }}/{{ item.lladdr }}-upgrade.conf"
+ when: item.image == "openbsd"
+ loop: "{{ vmm_vms }}"
-- name: generate disklabel file
+- name: generate disklabel configurations
template:
<<: *generation_steps
src: disklabel.j2
@@ -47,5 +49,6 @@
owner: 0
group: 0
state: hard
+ force: true
when: item.image == "openbsd"
loop: "{{ vmm_vms }}"
diff --git a/roles/vmm/templates/autoinstall.conf.j2 b/roles/vmm/templates/autoinstall.conf.j2
index 829c90f..7a784ab 100644
--- a/roles/vmm/templates/autoinstall.conf.j2
+++ b/roles/vmm/templates/autoinstall.conf.j2
@@ -1,16 +1,17 @@
{% set guest = hostvars[item.name] %}
System hostname = {{ item.name }}
-Network interfaces = vio0
-IPv4 address for vio0 = {{ host.__ip.external }}
-Using DNS domainname = {{ host.__domain_name }}
+Which network interface do you wish to configure = vio0
+IPv4 address for vio0 = {{ guest.__ip.external }}
+Default IPv4 route = "{{ ansible_default_ipv4.gateway }}"
+Using DNS domainname = {{ guest.__domain_name }}
Using DNS nameservers = {{ __global_domain_name_servers | join (" ") }}
Password for root = {{ vmm_default_password }}
Public ssh key for root account = {{ vmm_default_ssh_key }}
Which disk is the root disk = sd0
+URL to autopartitioning template for disklabel = http://{{ ansible_default_ipv4.address }}/{{ item.lladdr }}-disklabel.conf
Allow root ssh login = yes
What timezone are you in = {{ vmm_default_timezone }}
Unable to connect using https. Use http instead = {{ "yes" if vmm_default_fallback_http else "no" }}
Location of sets = http
HTTP Server = cdn.openbsd.org
-Server = {{ ansible_default_ipv4.gateway }}
Set name(s) = -all bsd* base* comp* man*
remember that computers suck.