From b9b2f51bc8547f0cb4f9c354956650841941f119 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 2 Dec 2018 03:12:32 +0100 Subject: merge over installer roles from realraum repo --- roles/vm/host/defaults/main.yml | 7 ------ roles/vm/host/handlers/main.yml | 4 ++-- roles/vm/host/meta/main.yml | 3 +++ roles/vm/host/tasks/main.yml | 50 +++++++++-------------------------------- 4 files changed, 16 insertions(+), 48 deletions(-) delete mode 100644 roles/vm/host/defaults/main.yml create mode 100644 roles/vm/host/meta/main.yml (limited to 'roles/vm/host') diff --git a/roles/vm/host/defaults/main.yml b/roles/vm/host/defaults/main.yml deleted file mode 100644 index 0e3cddf1..00000000 --- a/roles/vm/host/defaults/main.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -vm_host_force_download_installer: False -vm_host_installer_url: - # debian: "{{ debian_mirror.packages | default('http://deb.debian.org/debian') }}" - # ubuntu: "{{ ubuntu_mirror | default('http://archive.ubuntu.com/ubuntu') }}" - debian: "http://deb.debian.org/debian" - ubuntu: "http://archive.ubuntu.com/ubuntu" diff --git a/roles/vm/host/handlers/main.yml b/roles/vm/host/handlers/main.yml index 158f4dcd..6541dd80 100644 --- a/roles/vm/host/handlers/main.yml +++ b/roles/vm/host/handlers/main.yml @@ -1,5 +1,5 @@ --- -- name: restart inetd +- name: restart haveged service: - name: openbsd-inetd + name: haveged state: restarted diff --git a/roles/vm/host/meta/main.yml b/roles/vm/host/meta/main.yml new file mode 100644 index 00000000..40f6fcb3 --- /dev/null +++ b/roles/vm/host/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - role: debian-installer diff --git a/roles/vm/host/tasks/main.yml b/roles/vm/host/tasks/main.yml index 248f855c..010fdce4 100644 --- a/roles/vm/host/tasks/main.yml +++ b/roles/vm/host/tasks/main.yml @@ -1,53 +1,25 @@ --- -- name: install tftpd and python-libvirt +- name: install dependencies apt: name: - - atftpd - - openbsd-inetd - qemu-kvm - - libvirt-bin + - # configuration package, pulls in libvirt-clients and libvirt-daemon + libvirt-daemon-system - python-libvirt + - haveged state: present -- name: configure tftpd via inetd +- name: configure haveged lineinfile: - regexp: "^#?({{ vm_host.network.ip }}:)?tftp" - line: "{{ vm_host.network.ip }}:tftp dgram udp4 wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd --tftpd-timeout 300 --retry-timeout 5 --maxthread 10 --verbose=5 {{ vm_host.installer.preseed_path }}" - path: /etc/inetd.conf - notify: restart inetd + regexp: "^#?DAEMON_ARGS" + line: 'DAEMON_ARGS="-w 3072"' + path: /etc/default/haveged + notify: restart haveged - name: make sure installer directories exists with_items: - - "{{ vm_host.installer.path }}" - - "{{ vm_host.installer.preseed_path }}" + - "{{ debian_installer_path }}" + - "{{ preseed_path }}" file: name: "{{ item }}" state: directory - -- 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 }}" -- cgit v1.2.3