diff options
Diffstat (limited to 'roles/vm/host/tasks')
-rw-r--r-- | roles/vm/host/tasks/main.yml | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/roles/vm/host/tasks/main.yml b/roles/vm/host/tasks/main.yml index 83b5fca1..ef349d4c 100644 --- a/roles/vm/host/tasks/main.yml +++ b/roles/vm/host/tasks/main.yml @@ -18,15 +18,35 @@ path: /etc/default/haveged notify: restart haveged +- name: install vm-host network + when: vm_host.network is defined + include_tasks: network.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_path }}" + fstype: "{{ installer_lvm.fs }}" + state: mounted + - name: make sure installer directories exists loop: - - "{{ debian_installer_path }}" + - "{{ installer_path }}" - "{{ preseed_path }}" file: name: "{{ item }}" state: directory - -- name: install vm-host network - when: vm_host.network is defined - include_tasks: network.yml - |