aboutsummaryrefslogblamecommitdiffstats
path: root/roles/vmm/tasks/download_iso.yml
blob: 6f0c5f6fe8a79a63e07c99e855920687bcd2d49f (plain) (tree)
1
2
3
4
5
6
7
8

                               


                                                      


   


                          

                          
                        


                      

                          
                                        
                                         


                          

                            

               

# 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.