Skip to content

Commit 136edcf

Browse files
author
Christian Iuga
committed
avoid copy when checksum is specify
1 parent c306122 commit 136edcf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tasks/volumes.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99

1010
- name: Ensure local images are copied
1111
copy:
12-
src: "{{ item }}"
13-
dest: "{{ libvirt_vm_image_cache_path }}/{{ item | basename }}"
14-
with_items: "{{ volumes | selectattr('image', 'defined') | map(attribute='image') | list }}"
15-
when: "'http' not in item"
12+
src: "{{ item.image }}"
13+
dest: "{{ libvirt_vm_image_cache_path }}/{{ item.image | basename }}"
14+
checksum: "{{ item.checksum | default(omit) }}"
15+
with_items: "{{ volumes | selectattr('image', 'defined') | list }}"
16+
when: "'http' not in item.image"
1617

1718
- name: Ensure the VM disk volumes exist
1819
script: >

0 commit comments

Comments
 (0)