aboutsummaryrefslogtreecommitdiffstats
path: root/roles/vmm/tasks/set_facts.yml
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2020-11-10 22:34:09 +0100
committerbinary <me@rgoncalves.se>2020-11-10 22:34:09 +0100
commitbd588c773a757c447f754dc926c06123087b6b29 (patch)
tree7c02302756d01e2a2ddd90db9a508d77e45454df /roles/vmm/tasks/set_facts.yml
parent0a673e300800b91342499cec9cd482b5d2d9c603 (diff)
downloadinfrastructure-bd588c773a757c447f754dc926c06123087b6b29.tar.gz
Refactor vmm variables
Diffstat (limited to 'roles/vmm/tasks/set_facts.yml')
-rw-r--r--roles/vmm/tasks/set_facts.yml5
1 files changed, 4 insertions, 1 deletions
diff --git a/roles/vmm/tasks/set_facts.yml b/roles/vmm/tasks/set_facts.yml
index 5263d06..a38a63d 100644
--- a/roles/vmm/tasks/set_facts.yml
+++ b/roles/vmm/tasks/set_facts.yml
@@ -4,11 +4,14 @@
---
- set_fact:
+ disk_file: "{{ vmm.disk_dir }}/{{ guest }}.{{ vmm.disk_format }}"
+ when: guest is defined
+
+- set_fact:
iso_latest: "{{ vmm.iso_dir }}/{{ vmm.iso[iso].name }}-latest.iso"
when: iso is defined
- set_fact:
- disk_file: "{{ vmm.disk_dir }}/{{ guest }}.{{ vmm.disk_format }}"
iso_file: "{{ iso_latest | regex_replace('latest', vmm.iso[iso].version) }}"
iso_url: "{{ vmm.iso[iso].url \
| regex_replace('VERSIONDIR', vmm.iso[iso].versiondir) \
remember that computers suck.