diff options
Diffstat (limited to 'roles/vm/host')
-rw-r--r-- | roles/vm/host/base/tasks/main.yml | 40 |
1 files changed, 13 insertions, 27 deletions
diff --git a/roles/vm/host/base/tasks/main.yml b/roles/vm/host/base/tasks/main.yml index f789d2e0..0a1f2182 100644 --- a/roles/vm/host/base/tasks/main.yml +++ b/roles/vm/host/base/tasks/main.yml @@ -2,13 +2,13 @@ - name: install dependencies apt: name: - - qemu-kvm - - # configuration package, pulls in libvirt-clients and libvirt-daemon - libvirt-daemon-system - - "{{ python_basename }}-libvirt" - - haveged - - bridge-utils - - acl + - qemu-kvm + - # configuration package, pulls in libvirt-clients and libvirt-daemon + libvirt-daemon-system + - "{{ python_basename }}-libvirt" + - haveged + - bridge-utils + - acl state: present - name: configure haveged @@ -22,26 +22,12 @@ when: "'zfs' in vm_host" include_tasks: zfs.yml -- name: create lvm-based disk for installers - when: installer_lvm is defined - block: - - name: create logical volume - lvol: - vg: "{{ installer_lvm.vg }}" - lv: "{{ installer_lvm.lv }}" - size: "{{ installer_lvm.size }}" - - - name: create filesystem - filesystem: - fstype: "{{ installer_lvm.fs }}" - dev: "/dev/mapper/{{ installer_lvm.vg | replace('-', '--') }}-{{ installer_lvm.lv | replace('-', '--') }}" - - - name: mount filesytem - mount: - src: "/dev/mapper/{{ installer_lvm.vg | replace('-', '--') }}-{{ installer_lvm.lv | replace('-', '--') }}" - path: "{{ installer_base_path }}" - fstype: "{{ installer_lvm.fs }}" - state: mounted +- 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: |