summaryrefslogtreecommitdiffstats
path: root/roles/openshift_expand_partition/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_expand_partition/tasks/main.yml')
-rw-r--r--roles/openshift_expand_partition/tasks/main.yml14
1 files changed, 14 insertions, 0 deletions
diff --git a/roles/openshift_expand_partition/tasks/main.yml b/roles/openshift_expand_partition/tasks/main.yml
new file mode 100644
index 000000000..8bc399070
--- /dev/null
+++ b/roles/openshift_expand_partition/tasks/main.yml
@@ -0,0 +1,14 @@
+---
+- name: Ensure growpart is installed
+ yum: pkg=cloud-utils-growpart state=present
+
+- name: Grow the partitions
+ command: "growpart {{oep_drive}} {{oep_partition}}"
+
+- name: Expand the filesystem - xfs
+ command: "xfs_growfs {{oep_drive}}{{oep_partition}}"
+ when: oep_file_system == "xfs"
+
+- name: Expand the filesystem - ext(2,3,4)
+ command: "resize2fs {{oep_drive}}{{oep_partition}}"
+ when: oep_file_system == "ext"