aboutsummaryrefslogblamecommitdiffstats
path: root/roles/vmm/tasks/set_facts.yml
blob: 6b6dbfe3fdfbce15a8380e1e916416e65b858d15 (plain) (tree)
1
2
3
4
5
6
7
8
9
10




                           

                           


                                                                     

                              


                                                                      

                              








                                                                                

# vmm ~~ tasks/set_fact.yml

---

- name: ensure guest exists
  set_facts:
    disk_file: "{{ vmm.disk_dir }}/{{ guest }}.{{ vmm.disk_format }}"
  when: guest is defined

- name: generate iso infos 1/2
  set_fact:
    iso_latest: "{{ vmm.iso_dir }}/{{ vmm.iso[iso].name }}-latest.iso"
  when: iso is defined

- name: generate iso infos 2/2
  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.