Jan-Jonas Sämann
0ca924eca0
Pull iso files into Proxmox's template/iso/ directory - role: prepare-template-iso url: "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-9.6.0-amd64-netinst.iso"
20 lines
684 B
YAML
20 lines
684 B
YAML
---
|
|
# tasks:
|
|
# - name: Fetch basic distro iso templates
|
|
# include_role: name=prepare-template-iso
|
|
# vars:
|
|
# url: "{{ item }}"
|
|
# with_items:
|
|
# - "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-9.6.0-amd64-netinst.iso"
|
|
# - "ftp://ftp.rrzn.uni-hannover.de/pub/mirror/linux/ubuntu-releases/18.04.1.0/ubuntu-18.04.1.0-live-server-amd64.iso"
|
|
|
|
- name: "{{ url | basename }} file exists"
|
|
stat: path=/var/lib/vz/template/iso/{{ url | basename }}
|
|
register: template_iso
|
|
|
|
- name: "download {{ url | basename }}"
|
|
get_url: url={{ url }} dest=/var/lib/vz/template/iso/{{ url | basename }}
|
|
when: template_iso.stat.exists == False
|
|
notify: qm rescan
|
|
|