aboutsummaryrefslogtreecommitdiffstats
path: root/roles/vmm/templates
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-12-07 15:41:02 +0000
committerRomain Gonçalves <me@rgoncalves.se>2021-12-07 20:24:51 +0000
commit9bd2c8c17a22c84da9a6ba6407c5b928d77fb469 (patch)
treee382576853ac2ebfeffcf3eda6e45f6ec9618656 /roles/vmm/templates
parent12cf22b1a8d9ad23809ad8048119a6920cbb9675 (diff)
downloadrules-9bd2c8c17a22c84da9a6ba6407c5b928d77fb469.tar.gz
roles/vmm: Serve autoinstall configurations via httpd
Diffstat (limited to 'roles/vmm/templates')
-rw-r--r--roles/vmm/templates/autoinstall.conf.j212
-rw-r--r--roles/vmm/templates/hostname.j21
-rw-r--r--roles/vmm/templates/httpd.conf.j24
-rw-r--r--roles/vmm/templates/vm.conf.j22
4 files changed, 17 insertions, 2 deletions
diff --git a/roles/vmm/templates/autoinstall.conf.j2 b/roles/vmm/templates/autoinstall.conf.j2
new file mode 100644
index 0000000..de64c42
--- /dev/null
+++ b/roles/vmm/templates/autoinstall.conf.j2
@@ -0,0 +1,12 @@
+System hostname = {{ item.name }}
+Password for root = {{ vmm_default_password }}
+Network interfaces = run0
+IPv4 address for run0 = dhcp
+Public ssh key for user = {{ vmm_default_ssh_key }}
+Which disk is the root disk = sd0
+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*
diff --git a/roles/vmm/templates/hostname.j2 b/roles/vmm/templates/hostname.j2
deleted file mode 100644
index 68b989a..0000000
--- a/roles/vmm/templates/hostname.j2
+++ /dev/null
@@ -1 +0,0 @@
-add {{ vmm.switch.interface_host }}
diff --git a/roles/vmm/templates/httpd.conf.j2 b/roles/vmm/templates/httpd.conf.j2
new file mode 100644
index 0000000..ed9feb6
--- /dev/null
+++ b/roles/vmm/templates/httpd.conf.j2
@@ -0,0 +1,4 @@
+server "autoinstall" {
+ listen on * port 80
+ root "/htdocs/autoinstall"
+}
diff --git a/roles/vmm/templates/vm.conf.j2 b/roles/vmm/templates/vm.conf.j2
index d45c398..8653616 100644
--- a/roles/vmm/templates/vm.conf.j2
+++ b/roles/vmm/templates/vm.conf.j2
@@ -6,7 +6,7 @@ switch "{{ vmm_network_switch.name }}" {
}
# virtual machines
-{% for vm in __vms %}
+{% for vm in vmm_vms %}
vm "{{ vm.name }}" {
{% if vm.enabled is defined and not vm.enabled %}
disable
remember that computers suck.