MNAIO: Ensure vm_use_snapshot is defined

When not using a file-backed backing store, the vriable is not
defined and results in an error to that effect.

Change-Id: I3142a5960bc4521f79bbdfe32b0e7a0f71742b7d
This commit is contained in:
Jesse Pretorius 2018-08-17 10:27:26 +01:00
parent 0b8068ef2a
commit 9488e76bf1

View File

@ -132,7 +132,7 @@
name: "{{ hostvars[item]['server_hostname'] }}"
command: define
xml: >-
{%- if vm_use_snapshot | bool %}
{%- if (vm_use_snapshot | default(False)) | bool %}
{{ lookup('file', _virt_pools.pools.default.path | default('/data') ~ '/' ~ hostvars[item]['server_hostname'] ~ '.xml') }}
{%- else %}
{{ lookup('template', 'kvm/kvm-vm.xml.j2') }}