summaryrefslogtreecommitdiffstats
path: root/roles/openshift_storage_nfs_lvm/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_storage_nfs_lvm/tasks/main.yml')
-rw-r--r--roles/openshift_storage_nfs_lvm/tasks/main.yml24
1 files changed, 24 insertions, 0 deletions
diff --git a/roles/openshift_storage_nfs_lvm/tasks/main.yml b/roles/openshift_storage_nfs_lvm/tasks/main.yml
new file mode 100644
index 000000000..e9f5814bb
--- /dev/null
+++ b/roles/openshift_storage_nfs_lvm/tasks/main.yml
@@ -0,0 +1,24 @@
+---
+- name: Create lvm volumes
+ lvol: vg={{osnl_volume_group}} lv={{ item }} size={{osnl_volume_size}}G
+ with_sequence: start={{osnl_volume_num_start}} count={{osnl_number_of_volumes}} format={{osnl_volume_prefix}}{{osnl_volume_size}}g%04d
+
+- name: create filesystem
+ filesystem: fstype=xfs dev=/dev/{{osnl_volume_group}}/{{ item }}
+ with_sequence: start={{osnl_volume_num_start}} count={{osnl_number_of_volumes}} format={{osnl_volume_prefix}}{{osnl_volume_size}}g%04d
+
+- name: mount volumes
+ mount: name={{osnl_mount_dir}}/{{ item }} src=/dev/{{osnl_volume_group}}/{{ item }} state=mounted fstype=xfs passno=0
+ with_sequence: start={{osnl_volume_num_start}} count={{osnl_number_of_volumes}} format={{osnl_volume_prefix}}{{osnl_volume_size}}g%04d
+
+- name: Make mounts owned by nfsnobody
+ file: path={{osnl_mount_dir}}/{{ item }} owner=nfsnobody group=nfsnobody mode=0700
+ with_sequence: start={{osnl_volume_num_start}} count={{osnl_number_of_volumes}} format={{osnl_volume_prefix}}{{osnl_volume_size}}g%04d
+
+- include: nfs.yml
+
+- name: Create volume json file
+ template: src=../templates/nfs.json.j2 dest=/root/persistent-volume.{{ item }}.json
+ with_sequence: start={{osnl_volume_num_start}} count={{osnl_number_of_volumes}} format={{osnl_volume_prefix}}{{osnl_volume_size}}g%04d
+
+# TODO - Get the json files to an openshift-master, and load them. \ No newline at end of file