summaryrefslogtreecommitdiff
path: root/roles/storage/lvm/groups
diff options
context:
space:
mode:
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