Find latest ISO images automatically.

This commit is contained in:
Andreas B. Mundt 2022-07-11 18:50:38 +02:00 committed by Andreas B. Mundt
parent e61a8b899c
commit 291866eb93
2 changed files with 53 additions and 31 deletions

View file

@ -31,14 +31,12 @@
- di-netboot-assistant
- apt-cacher-ng
live_images:
- iso: 'debian-live-11.3.0-amd64-gnome+nonfree.iso'
name: 'gnome'
- iso: 'debian-live-11.3.0-amd64-kde+nonfree.iso'
name: 'kde'
- iso: 'debian-live-11.3.0-amd64-standard+nonfree.iso'
name: 'standard-cli'
live_url: 'https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/11.3.0-live+nonfree/amd64/iso-hybrid/'
live_desktop:
- gnome
- kde
- standard
live_url: 'https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current-live/amd64/iso-hybrid/'
# The edulive role generates customized Debian-Live images.
# Make sure you have sufficient disk space available (~30GiB?).
@ -68,6 +66,21 @@
value: /var/lib/tftpboot
vtype: string
- name: find available iso images
uri:
url: "{{ live_url }}"
return_content: true
register: idx
- name: find and set ISO image version
set_fact:
version: "{{ idx.content | regex_findall('debian-live-(\\d+\\.\\d+\\.\\d+)-amd64-', '\\1') | first }}"
- name: define ISO image map
set_fact:
live_iso: "{{ live_iso | default({}) | combine({ item: 'debian-live-' + version + '-amd64-' + item + '+nonfree.iso' }) }}"
loop: "{{ live_desktop }}"
roles:
- up2date_debian
- netbootinstaller