Skip to content

Commit 5388196

Browse files
authored
Fixed default for volume.type
1 parent 57305db commit 5388196

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/vm.xml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
<devices>
3131
<emulator>{{ libvirt_vm_emulator }}</emulator>
3232
{% for volume in volumes %}
33-
<disk type='{{ volume.type |default(libvirt_volume_default_type) }}' device='{{ volume.device | default(libvirt_volume_default_device) }}'>
33+
<disk type='{{ volume.type | default(libvirt_volume_default_type) }}' device='{{ volume.device | default(libvirt_volume_default_device) }}'>
3434
<driver name='qemu' type='{{ volume.format | default(libvirt_volume_default_format) }}'/>
35-
{% if volume.type is defined and volume.type == 'file' %}
35+
{% if volume.type | default(libvirt_volume_default_type) == 'file' %}
3636
<source file='{{ volume.file_path |default(libvirt_volume_default_images_path) }}/{{ volume.name}}'/>
3737
{% else %}
3838
<source pool='{{ volume.pool }}' volume='{{ volume.name }}'/>

0 commit comments

Comments
 (0)