summaryrefslogtreecommitdiff
path: root/roles/vm-host/tasks
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2017-11-23 01:12:59 +0100
committerChristian Pointner <equinox@spreadspace.org>2017-11-23 01:12:59 +0100
commite273477b56d8e08ad1eb288d79e60c491df3c887 (patch)
treef930b32b01cbe386808a87b9e1ea7c22713cbe6c /roles/vm-host/tasks
parentadded inital role vm-host (diff)
vm install role basically works now - needs cleanup and testing
Diffstat (limited to 'roles/vm-host/tasks')
-rw-r--r--roles/vm-host/tasks/main.yaml28
1 files changed, 27 insertions, 1 deletions
diff --git a/roles/vm-host/tasks/main.yaml b/roles/vm-host/tasks/main.yaml
index 4c216d27..3decb3b2 100644
--- a/roles/vm-host/tasks/main.yaml
+++ b/roles/vm-host/tasks/main.yaml
@@ -23,4 +23,30 @@
name: "{{ item }}"
state: directory
-# TODO: download installer images
+- name: prepare directories for installer images
+ with_subelements:
+ - "{{ vm_host.installer.distros }}"
+ - arch
+ file:
+ name: "{{ vm_host.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: "{{ vm_host.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: "{{ vm_host.installer.path }}/{{ item.0.distro }}-{{ item.0.codename }}/{{ item.1 }}/initrd.gz"
+ mode: 0644
+ force: "{{ vm_host_force_download_installer }}"