vm_host:
installer:
net_if: br-mgmt
- distros:
- - distro: debian
- codename: stretch
- arch:
- - amd64
- - i386
- - distro: ubuntu
- codename: xenial
- arch:
- - amd64
- - i386
network:
interface: br-mgmt
ip: "{{ net.mgmt.prefix | ipaddr(65) | ipaddr('address') }}"
--- /dev/null
+arch: amd64
+
+distros:
+ - distro: debian
+ codename: stretch
+ arch:
+ - amd64
+ - i386
+ - distro: ubuntu
+ codename: xenial
+ arch:
+ - amd64
+ - i386
+
+debian_installer_force_download: no
+
+debian_installer_url:
+ debian: "http://debian.mur.at/debian"
+ ubuntu: "http://ubuntu.uni-klu.ac.at/ubuntu"
--- /dev/null
+- name: prepare directories for installer images
+ with_subelements:
+ - "{{ distros }}"
+ - arch
+ file:
+ name: "{{ debian_installer_path }}/{{ item.0.distro }}-{{ item.0.codename }}/{{ item.1 }}"
+ state: directory
+
+- name: download installer kernel images
+ with_subelements:
+ - "{{ distros }}"
+ - arch
+ get_url:
+ url: "{{ debian_installer_url[item.0.distro] }}/dists/{{ item.0.codename }}/main/installer-{{ item.1 }}/current/images/netboot/{{ item.0.distro }}-installer/{{ item.1 }}/linux"
+ dest: "{{ debian_installer_path }}/{{ item.0.distro }}-{{ item.0.codename }}/{{ item.1 }}/linux"
+ mode: 0644
+ force: "{{ debian_installer_force_download }}"
+
+- name: download installer initrd.gz
+ with_subelements:
+ - "{{ distros }}"
+ - arch
+ get_url:
+ url: "{{ debian_installer_url[item.0.distro] }}/dists/{{ item.0.codename }}/main/installer-{{ item.1 }}/current/images/netboot/{{ item.0.distro }}-installer/{{ item.1 }}/initrd.gz"
+ dest: "{{ debian_installer_path }}/{{ item.0.distro }}-{{ item.0.codename }}/{{ item.1 }}/initrd.gz"
+ mode: 0644
+ force: "{{ debian_installer_force_download }}"
+++ /dev/null
----
-vm_host_force_download_installer: False
-vm_host_installer_url:
- debian: "http://debian.mur.at/debian"
- ubuntu: "http://ubuntu.uni-klu.ac.at/ubuntu"
--- /dev/null
+---
+dependencies:
+ - role: debian-installer
file:
name: "{{ item }}"
state: directory
-
-- name: prepare directories for installer images
- with_subelements:
- - "{{ vm_host.installer.distros }}"
- - arch
- file:
- name: "{{ debian_installer_path }}/{{ item.0.distro }}-{{ item.0.codename }}/{{ item.1 }}"
- state: directory
-
-- name: download installer kernel images
- with_subelements:
- - "{{ vm_host.installer.distros }}"
- - arch
- get_url:
- url: "{{ vm_host_installer_url[item.0.distro] }}/dists/{{ item.0.codename }}/main/installer-{{ item.1 }}/current/images/netboot/{{ item.0.distro }}-installer/{{ item.1 }}/linux"
- dest: "{{ debian_installer_path }}/{{ item.0.distro }}-{{ item.0.codename }}/{{ item.1 }}/linux"
- mode: 0644
- force: "{{ vm_host_force_download_installer }}"
-
-- name: download installer initrd.gz
- with_subelements:
- - "{{ vm_host.installer.distros }}"
- - arch
- get_url:
- url: "{{ vm_host_installer_url[item.0.distro] }}/dists/{{ item.0.codename }}/main/installer-{{ item.1 }}/current/images/netboot/{{ item.0.distro }}-installer/{{ item.1 }}/initrd.gz"
- dest: "{{ debian_installer_path }}/{{ item.0.distro }}-{{ item.0.codename }}/{{ item.1 }}/initrd.gz"
- mode: 0644
- force: "{{ vm_host_force_download_installer }}"