summaryrefslogtreecommitdiffstats
path: root/roles/ands_vagrant_vmconf/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/ands_vagrant_vmconf/tasks/main.yml')
-rw-r--r--roles/ands_vagrant_vmconf/tasks/main.yml28
1 files changed, 28 insertions, 0 deletions
diff --git a/roles/ands_vagrant_vmconf/tasks/main.yml b/roles/ands_vagrant_vmconf/tasks/main.yml
new file mode 100644
index 0000000..f52a52d
--- /dev/null
+++ b/roles/ands_vagrant_vmconf/tasks/main.yml
@@ -0,0 +1,28 @@
+ - name: Get partition info
+ parted: device="/dev/sda" unit="MiB"
+ register: partinfo
+
+ - set_fact: parts="{{partinfo.partitions | length}}"
+ - set_fact: end="{{partinfo.partitions[(parts | int) - 1].end | round | int}}"
+
+ - name: Add partition to the first disk
+ parted: device="/dev/sda" number=4 part_start="{{ end }}MiB" flags="lvm" state="present"
+
+ - name: Resize Root VG
+ lvg: vg="VolGroup00" pvs="/dev/sda3,/dev/sda4"
+
+ - name: Resize Root LV
+ lvol: vg="VolGroup00" lv="LogVol00" size="+100%FREE"
+
+ - name: Resize FS
+ filesystem: dev="/dev/mapper/VolGroup00-LogVol00" fstype="xfs" resizefs="yes"
+
+ - name: Create required directories
+ file: path="/etc/origin/node/" state="directory"
+
+# We just need networkmanager running
+# - name: Bypass absent NM
+# copy: remote_src="yes" src="/etc/resolv.conf" dest="/etc/origin/node/resolv.conf"
+
+ - name: Update CentOS
+ yum: name=* state=latest update_cache=yes