vmware builds
This commit is contained in:
13
roles/oatakan.rhel_template_build/templates/grow_part.sh.j2
Normal file
13
roles/oatakan.rhel_template_build/templates/grow_part.sh.j2
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
the_root_vgname='{{ ansible_lvm.lvs[the_root_lvname].vg | default('vg00') }}'
|
||||
the_root_lvname='{{ the_root_lvname | default('root') }}'
|
||||
the_root_pvname=$(vgdisplay -v $the_root_vgname 2> /dev/null | awk '/PV Name/ {print $3}')
|
||||
the_root_pv_partnum=$(echo $the_root_pvname | grep -o '[0-9]$')
|
||||
the_root_pv_device=$(echo $the_root_pvname | grep -o '.*[^0-9]')
|
||||
the_root_mount_point=$(lsblk -l -o NAME,MOUNTPOINT | grep $the_root_vgname-$the_root_lvname | awk '{print $2}')
|
||||
|
||||
/usr/bin/growpart $the_root_pv_device $the_root_pv_partnum
|
||||
/usr/sbin/pvresize $the_root_pvname
|
||||
/usr/sbin/lvextend /dev/mapper/$the_root_vgname-$the_root_lvname $the_root_pvname
|
||||
/usr/sbin/xfs_growfs $the_root_mount_point
|
||||
@@ -0,0 +1 @@
|
||||
modprobe vmhgfs
|
||||
@@ -0,0 +1,9 @@
|
||||
[vmware-tools]
|
||||
name=VMware Tools
|
||||
{% if ansible_distribution_major_version == "7" %}
|
||||
baseurl=http://packages.vmware.com/packages/rhel7/x86_64/
|
||||
{% else %}
|
||||
baseurl=http://packages.vmware.com/tools/esx/latest/rhel{{ ansible_distribution_major_version }}/$basearch
|
||||
{% endif %}
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
Reference in New Issue
Block a user