datavol: Handle undefined logical_volumes
This fixes an `Unable to look up a name or access an atribute in template string` error when applying the `datavol.yml` playbook for a machine that does not define any LVM logical volumes.unifi-restore
parent
59d17bf3f4
commit
bf33c2ab7c
|
@ -36,7 +36,7 @@
|
|||
lv: '{{ item.1.name }}'
|
||||
vg: '{{ item.0.key }}'
|
||||
size: '{{ item.1.size }}'
|
||||
loop: '{{ logical_volumes | dict2items | subelements("value.lvs") }}'
|
||||
loop: '{{ logical_volumes | d({}) | dict2items | subelements("value.lvs") }}'
|
||||
loop_control:
|
||||
label: '{{ item.0.key }}/{{ item.1.name }}'
|
||||
tags:
|
||||
|
|
Loading…
Reference in New Issue