diff options
Diffstat (limited to 'roles/vmm')
-rw-r--r-- | roles/vmm/tasks/disk.yml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/roles/vmm/tasks/disk.yml b/roles/vmm/tasks/disk.yml index 423d855..95427c6 100644 --- a/roles/vmm/tasks/disk.yml +++ b/roles/vmm/tasks/disk.yml @@ -13,3 +13,17 @@ find: path: "{{ vmm_disk_dir }}" patterns: "*.{{ vmm_disk_format }}" + register: result + +- name: append disks informations to vms facts + set_fact: + vmm_vms_tmp: > + {{ vmm_vms_tmp | default([]) + [ item | combine({ + "disk": result.files + | selectattr("path", "regex", item.name, ) + }) ] }} + loop: "{{ vmm_vms }}" + +- name: save variables + set_fact: + vmm_vms: "{{ vmm_vms_tmp }}" |