Skip to content

Commit 9612557

Browse files
authored
Merge pull request #78 from jlsm-se/feature/allow-remote-src-false
Allow uploading volumes from host that launched the playbook
2 parents 231b652 + bc03286 commit 9612557

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ Role Variables
118118
- `image` and `backing_image` are mutually exclusive options.
119119
- `target`: (optional) Manually influence type and order of volumes
120120
- `dev`: (optional) Block device path when type is `block`.
121+
- `remote_src`: (optional) When type is `file` or `block`, specify wether `image` points to a remote file (true) or a file local to the host that launched the playbook (false). Defaults to true.
122+
121123

122124
- `interfaces`: a list of network interfaces to attach to the VM.
123125
Each network interface is defined with the following dict:

tasks/volumes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
src: "{{ item.image }}"
1313
dest: "{{ libvirt_vm_image_cache_path }}/{{ item.image | basename }}"
1414
checksum: "{{ item.checksum | default(omit) }}"
15-
remote_src: true
15+
remote_src: "{{ item.remote_src | default(true) | bool }}"
1616
with_items: "{{ volumes | selectattr('image', 'defined') | list }}"
1717
when: "'http' not in item.image"
1818

0 commit comments

Comments
 (0)