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
112
112
` libvirt_volume_default_format ` are valid here. Default is
113
113
` libvirt_volume_default_format ` .
114
114
- ` 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.
115
116
- ` backing_image ` : (optional) name of the backing volume which is assumed to already be the same pool (copy-on-write).
116
117
- ` image ` and ` backing_image ` are mutually exclusive options.
117
118
- ` target ` : (optional) Manually influence type and order of volumes
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : Ensure remote images are downloaded
3
3
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"
8
9
9
10
- name : Ensure local images are copied
10
11
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"
15
17
16
18
- name : Ensure the VM disk volumes exist
17
19
script : >
You can’t perform that action at this time.
0 commit comments