summaryrefslogtreecommitdiff
path: root/roles/storage/lvm/device/tasks/main.yml
blob: 303013ec0e7cdb908e261faf3e49accc1a663e25 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
---
- name: create logical volume
  lvol:
    vg: "{{ lvm_device.parent.vg | default(lvm_device.vg) }}"
    lv: "{{ lvm_device.lv }}"
    size: "{{ lvm_device.size }}"
    thinpool: "{{ lvm_device.parent.lv | default(omit) }}"

- name: export device path
  set_fact:
    storage_device_path: "/dev/mapper/{{ lvm_device.parent.vg | default(lvm_device.vg) | replace('-', '--') }}-{{ lvm_device.lv | replace('-', '--') }}"