summaryrefslogtreecommitdiff
path: root/roles/storage/lvm/volume/tasks/main.yml
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2024-01-22 21:46:44 +0100
committerChristian Pointner <equinox@spreadspace.org>2024-01-22 21:46:44 +0100
commit90818b302cadec86f14a17aae62fe00e606778df (patch)
tree9a4cc40312c7becf0ba73f061b8c8e94afc35726 /roles/storage/lvm/volume/tasks/main.yml
parentstorage/?/volume: add support for custom mount options (diff)
lvm/volume: make use of lvm/device
Diffstat (limited to 'roles/storage/lvm/volume/tasks/main.yml')
-rw-r--r--roles/storage/lvm/volume/tasks/main.yml15
1 files changed, 7 insertions, 8 deletions
diff --git a/roles/storage/lvm/volume/tasks/main.yml b/roles/storage/lvm/volume/tasks/main.yml
index eabf4022..006e7b89 100644
--- a/roles/storage/lvm/volume/tasks/main.yml
+++ b/roles/storage/lvm/volume/tasks/main.yml
@@ -1,19 +1,18 @@
---
-- name: create logical volume
- lvol:
- vg: "{{ lvm_volume.parent.vg | default(lvm_volume.vg) }}"
- lv: "{{ lvm_volume.lv }}"
- size: "{{ lvm_volume.size }}"
- thinpool: "{{ lvm_volume.parent.lv | default(omit) }}"
+- name: create lvm device
+ vars:
+ lvm_device: "{{ lvm_volume }}"
+ include_role:
+ name: storage/lvm/device
- name: create filesystem
filesystem:
+ dev: "{{ storage_device_path }}"
fstype: "{{ lvm_volume.fs }}"
- dev: "/dev/mapper/{{ lvm_volume.parent.vg | default(lvm_volume.vg) | replace('-', '--') }}-{{ lvm_volume.lv | replace('-', '--') }}"
- name: mount filesytem
mount:
- src: "/dev/mapper/{{ lvm_volume.parent.vg | default(lvm_volume.vg) | replace('-', '--') }}-{{ lvm_volume.lv | replace('-', '--') }}"
+ src: "{{ storage_device_path }}"
path: "{{ lvm_volume.dest }}"
fstype: "{{ lvm_volume.fs }}"
opts: "{{ lvm_volume.mntopts | default(omit) }}"