Commit bc5ecafd authored by ale's avatar ale

Add an 'enable_lvm' configuration variable for volumes

parent bfaf24fa
Pipeline #10766 passed with stage
in 2 minutes and 43 seconds
---
# Whether to create volumes as LVs.
enable_lvm: false
......@@ -20,12 +20,14 @@
lv: "{{ lv_name }}"
size: "{{ volume.size | default('10g') }}"
shrink: false
when: enable_lvm
- name: "Create a filesystem on {{ lv_name }}"
filesystem:
dev: "{{ lv_dev }}"
fstype: ext4
register: lv_mkfs
when: enable_lvm
- name: "Add the /etc/fstab entry for {{ lv_name }}"
mount:
......@@ -34,6 +36,7 @@
opts: "rw,noatime{% if volume.mount_opts is defined %},{{ volume.mount_opts }}{% endif %}"
fstype: ext4
state: mounted
when: enable_lvm
# Set permissions again if we have created the filesystem.
- name: "Fix permissions for {{ volume.path }}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment