Make `run_installer` default to no in the libvirt template
authornicoo <nicoo@realraum.at>
Mon, 28 Jan 2019 15:40:09 +0000 (16:40 +0100)
committernicoo <nicoo@realraum.at>
Mon, 28 Jan 2019 15:40:09 +0000 (16:40 +0100)
ansible/roles/vm/install/templates/libvirt-domain.xml.j2
ansible/vm-update.yml

index 9119f64..ff2ee60 100644 (file)
@@ -5,7 +5,7 @@
   <vcpu>{{ hostvars[hostname].install_cooked.numcpu }}</vcpu>
   <os>
     <type arch='x86_64' machine='pc-0.12'>hvm</type>
-{% if run_installer %}
+{% if run_installer | default(False) %}
     <kernel>{{ debian_installer_path }}/{{ install_distro }}-{{ install_codename }}/{{ hostvars[hostname].install_cooked.arch | default('amd64') }}/linux</kernel>
     <initrd>{{ preseed_tmpdir }}/initrd.preseed.gz</initrd>
     <cmdline>console=ttyS0,115200n8</cmdline>
@@ -19,7 +19,7 @@
   </features>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
-{% if run_installer %}
+{% if run_installer | default(False) %}
   <on_reboot>destroy</on_reboot>
   <on_crash>destroy</on_crash>
 {% else %}
index 548a49f..a5a2c83 100644 (file)
@@ -33,9 +33,6 @@
 
 - name: Update VM definition
   hosts: _vmhost_
-  vars:
-    run_installer: no
-
   tasks:
     - name: Wait for VM to shut down
       wait_for_virt: