summaryrefslogtreecommitdiff
path: root/roles/storage/lvm/groups
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-04-04 01:41:41 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-04-04 01:41:41 +0200
commit397d89e89013da5fd4e0bf5aa9708e72d8f8a23a (patch)
treee69a61c28750d6a498afd7d5b6db31623c6f66ef /roles/storage/lvm/groups
parentmove zfs roles to new storage subdir (diff)
add storage/lvm/groups
Diffstat (limited to 'roles/storage/lvm/groups')
-rw-r--r--roles/storage/lvm/groups/defaults/main.yml6
-rw-r--r--roles/storage/lvm/groups/tasks/main.yml12
2 files changed, 18 insertions, 0 deletions
diff --git a/roles/storage/lvm/groups/defaults/main.yml b/roles/storage/lvm/groups/defaults/main.yml
new file mode 100644
index 00000000..8a7e77fb
--- /dev/null
+++ b/roles/storage/lvm/groups/defaults/main.yml
@@ -0,0 +1,6 @@
+---
+# lvm_volume_groups:
+# foo:
+# pvs:
+# - /dev/sdb
+# - /dev/sdc1
diff --git a/roles/storage/lvm/groups/tasks/main.yml b/roles/storage/lvm/groups/tasks/main.yml
new file mode 100644
index 00000000..ddcd49c7
--- /dev/null
+++ b/roles/storage/lvm/groups/tasks/main.yml
@@ -0,0 +1,12 @@
+---
+- name: create volume groups
+ loop: "{{ lvm_groups | dict2items }}"
+ loop_control:
+ label: "{{ item.key }}"
+ lvg:
+ vg: "{{ item.key }}"
+ vg_options: "{{ item.value.options | default(omit) }}"
+ pvs: "{{ item.value.pvs }}"
+ pesize: "{{ item.value.pesize | default(omit) }}"
+ pv_options: "{{ item.value.pv_options | default(omit) }}"
+ state: present