summaryrefslogtreecommitdiff
path: root/dan/ele-winvm.yml
blob: 1af6ad5802e5583aff2b5c56fadab7c69b6b5cb7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
---
- name: Basic Setup
  hosts: ele-winvm
  gather_facts: no
  pre_tasks:
  - name: prepare disk
    loop: "{{ install.disks.virtio | default({}) | combine(install.disks.scsi | default({})) | dict2items | selectattr('value.type', 'eq', 'lvm') | list }}"
    loop_control:
      label: "{{ item.value.vg }} / {{ item.value.lv }}  ({{ item.value.size }})"
    delegate_to: "{{ vm_host.name }}"
    lvol:
      vg: "{{ item.value.vg }}"
      lv: "{{ item.value.lv }}"
      size: "{{ item.value.size }}"
      state: present

  roles:
  - role: vm/guest/create