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:
parent
0b8068ef2a
commit
9488e76bf1
@ -132,7 +132,7 @@
|
|||||||
name: "{{ hostvars[item]['server_hostname'] }}"
|
name: "{{ hostvars[item]['server_hostname'] }}"
|
||||||
command: define
|
command: define
|
||||||
xml: >-
|
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') }}
|
{{ lookup('file', _virt_pools.pools.default.path | default('/data') ~ '/' ~ hostvars[item]['server_hostname'] ~ '.xml') }}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
{{ lookup('template', 'kvm/kvm-vm.xml.j2') }}
|
{{ lookup('template', 'kvm/kvm-vm.xml.j2') }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user