summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2023-05-21 00:35:29 +0200
committerChristian Pointner <equinox@spreadspace.org>2023-05-21 00:35:29 +0200
commit3ee3bd306b3b58656c6397c09caf4be1b1d66644 (patch)
treeeeaacf62b8f42f16dd53657de5352aa2aa1f72c8
parentmove ch-omd to graveyard (diff)
cleanup vm configs for some hosts
-rw-r--r--inventory/host_vars/ele-mur.yml2
-rw-r--r--roles/vm/guest/create/templates/libvirt-domain.xml.j24
2 files changed, 4 insertions, 2 deletions
diff --git a/inventory/host_vars/ele-mur.yml b/inventory/host_vars/ele-mur.yml
index 598f2f8e..6a744865 100644
--- a/inventory/host_vars/ele-mur.yml
+++ b/inventory/host_vars/ele-mur.yml
@@ -32,7 +32,7 @@ network:
name: primary0
address: "{{ vm_host.network.bridges.public.prefix | ansible.utils.ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) }}"
gateway: "{{ vm_host.network.bridges.public.gateway }}"
- address6: "{{ vm_host.network.bridges.public.prefix6 | ansible.utils.ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) }}"
+ address6: "{{ vm_host.network.bridges.public.prefix6 | ansible.utils.ipaddr(vm_host.network.bridges.public.offsets6[inventory_hostname]) }}"
gateway6: "{{ vm_host.network.bridges.public.gateway6 }}"
interfaces:
- *_network_primary_
diff --git a/roles/vm/guest/create/templates/libvirt-domain.xml.j2 b/roles/vm/guest/create/templates/libvirt-domain.xml.j2
index fc0ce21e..ce7894c0 100644
--- a/roles/vm/guest/create/templates/libvirt-domain.xml.j2
+++ b/roles/vm/guest/create/templates/libvirt-domain.xml.j2
@@ -49,7 +49,8 @@
<backend model='random'>/dev/random</backend>
</rng>
-{% if vm_create_installer and install_distro == 'openbsd' %}
+{% if vm_create_installer %}
+{% if install_distro == 'openbsd' %}
<disk type='file' device='cdrom'>
<driver name='qemu'/>
<source file='{{ installer_tmpdir }}/{{ inventory_hostname }}.iso'/>
@@ -57,6 +58,7 @@
<readonly/>
</disk>
+{% endif %}
{% endif %}
{% if 'cdrom' in install.vm %}
{% for device,image in install.vm.cdrom.items() %}