aboutsummaryrefslogtreecommitdiffstats
path: root/roles/vmm/tasks/download_iso.yml
blob: 6f0c5f6fe8a79a63e07c99e855920687bcd2d49f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

# vmm ~~ tasks/download_iso.yml
# Download an iso file to hypervisor.
# Required :
# - iso : name of an iso file defined in vars/main.yml

---

- name: Check arguments
  fail: 
    msg: "arguments : iso"
  when: iso is not defined

- include: set_facts.yml

- name: Get latest iso
  get_url:
    url: "{{ iso_url }}"
    dest: "{{ iso_file }}"
    force: "{{ force | default('no') }}"
    checksum: "sha256:{{ iso_checksum }}"

- name: Symlink latest iso
  file:
    src: "{{ iso_file }}"
    dest: "{{ iso_latest }}"
    state: link

remember that computers suck.