aboutsummaryrefslogtreecommitdiffstats
path: root/roles/vmm/tasks/set_facts.yml
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2020-11-07 20:38:07 +0100
committerbinary <me@rgoncalves.se>2020-11-07 20:38:07 +0100
commit352c98322771af117a85904d580e1c062062d634 (patch)
treed3bca9d27d6ee5d678264d83fc22030d274f30bf /roles/vmm/tasks/set_facts.yml
parent282be811d2ac07a76d56ac066df5bf33d748bd64 (diff)
downloadinfrastructure-352c98322771af117a85904d580e1c062062d634.tar.gz
Refactor vmm role with automation
Diffstat (limited to 'roles/vmm/tasks/set_facts.yml')
-rw-r--r--roles/vmm/tasks/set_facts.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/roles/vmm/tasks/set_facts.yml b/roles/vmm/tasks/set_facts.yml
new file mode 100644
index 0000000..2acc458
--- /dev/null
+++ b/roles/vmm/tasks/set_facts.yml
@@ -0,0 +1,19 @@
+
+# vmm ~~ tasks/set_fact.yml
+
+---
+
+- set_fact:
+ iso_latest: "{{ vmm.iso_dir }}/{{ vmm.iso[iso].name }}-latest.iso"
+ when: iso is defined
+
+- set_fact:
+ iso_file: "{{ iso_latest | regex_replace('latest', vmm.iso[iso].version) }}"
+ iso_url: "{{ vmm.iso[iso].url \
+ | regex_replace('VERSIONDIR', vmm.iso[iso].versiondir) \
+ | regex_replace('VERSION', vmm.iso[iso].version) }}"
+ iso_checksum: "{{ vmm.iso[iso].sha256 \
+ | regex_replace('VERSIONDIR', vmm.iso[iso].versiondir) \
+ | regex_replace('VERSION', vmm.iso[iso].version) }}"
+ when: iso is defined
+
remember that computers suck.