summaryrefslogtreecommitdiff
path: root/roles/storage/lvm/volume/tasks/main.yml
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-04-04 04:09:17 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-04-04 04:09:17 +0200
commitaacbfb831930a4546e373121785065edc1b35d39 (patch)
tree6a6df055a694ba99842854b7cc05bd9d09792024 /roles/storage/lvm/volume/tasks/main.yml
parentadd storage/lvm/groups (diff)
port streaming/rtmp/streamer to new storage volume roles
Diffstat (limited to 'roles/storage/lvm/volume/tasks/main.yml')
-rw-r--r--roles/storage/lvm/volume/tasks/main.yml18
1 files changed, 18 insertions, 0 deletions
diff --git a/roles/storage/lvm/volume/tasks/main.yml b/roles/storage/lvm/volume/tasks/main.yml
new file mode 100644
index 00000000..9d335285
--- /dev/null
+++ b/roles/storage/lvm/volume/tasks/main.yml
@@ -0,0 +1,18 @@
+---
+- name: create logical volume
+ lvol:
+ vg: "{{ lvm_volume.vg }}"
+ lv: "{{ lvm_volume.lv }}"
+ size: "{{ lvm_volume.size }}"
+
+- name: create filesystem
+ filesystem:
+ fstype: "{{ lvm_volume.fs }}"
+ dev: "/dev/mapper/{{ lvm_volume.vg | replace('-', '--') }}-{{ lvm_volume.lv | replace('-', '--') }}"
+
+- name: mount filesytem
+ mount:
+ src: "/dev/mapper/{{ lvm_volume.vg | replace('-', '--') }}-{{ lvm_volume.lv | replace('-', '--') }}"
+ path: "{{ lvm_volume.dest }}"
+ fstype: "{{ lvm_volume.fs }}"
+ state: mounted