summaryrefslogtreecommitdiff
path: root/roles/vm/host/base/tasks/main.yml
blob: e001af1a64f079a564b122cb900896861708c9d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
- name: install dependencies
  apt:
    name:
    - qemu-kvm
    - ovmf
    - # configuration package, pulls in libvirt-clients and libvirt-daemon
      libvirt-daemon-system
    - "{{ python_basename }}-libvirt"
    - "{{ python_basename }}-lxml"
    - haveged
    - bridge-utils
    - acl
    - kpartx
    state: present

- name: configure haveged
  lineinfile:
    regexp: "^#?DAEMON_ARGS"
    line: 'DAEMON_ARGS="-w 3072"'
    path: /etc/default/haveged
  notify: restart haveged

- name: prepare zfs volumes
  when: "'zfs' in vm_host"
  include_tasks: zfs.yml

- name: prepare storage volume for installers
  when: installer_storage is defined
  vars:
    storage_volume: "{{ installer_storage | combine({'dest': installer_base_path}) }}"
  include_role:
    name: "storage/{{ installer_storage.type }}/volume"

- name: make sure installer directory exists
  file:
    name: "{{ installer_base_path }}"
    state: directory