File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ Role Variables
112112 ` libvirt_volume_default_format ` are valid here. Default is
113113 ` libvirt_volume_default_format ` .
114114 - ` image ` : (optional) a URL to an image with which the volume is initalised (full copy).
115+ - ` checksum ` : (optional) checksum of the ` image ` to avoid download when it's not necessary.
115116 - ` backing_image ` : (optional) name of the backing volume which is assumed to already be the same pool (copy-on-write).
116117 - ` image ` and ` backing_image ` are mutually exclusive options.
117118 - ` target ` : (optional) Manually influence type and order of volumes
Original file line number Diff line number Diff line change 11---
22- name : Ensure remote images are downloaded
33 get_url :
4- url : " {{ item }}"
5- dest : " {{ libvirt_vm_image_cache_path }}/{{ item | basename }}"
6- with_items : " {{ volumes | selectattr('image', 'defined') | map(attribute='image') | list }}"
7- when : " 'http' in item"
4+ url : " {{ item.image }}"
5+ dest : " {{ libvirt_vm_image_cache_path }}/{{ item.image | basename }}"
6+ checksum : " {{ item.checksum | default(omit) }}"
7+ with_items : " {{ volumes | selectattr('image', 'defined') | list }}"
8+ when : " 'http' in item.image"
89
910- name : Ensure local images are copied
1011 copy :
11- src : " {{ item }}"
12- dest : " {{ libvirt_vm_image_cache_path }}/{{ item | basename }}"
13- with_items : " {{ volumes | selectattr('image', 'defined') | map(attribute='image') | list }}"
14- 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"
1517
1618- name : Ensure the VM disk volumes exist
1719 script : >
You can’t perform that action at this time.
0 commit comments