Make bootstrap-ansible script compatible with RHEL

This patch enables the bootstrap-ansible.sh script to also work on RHEL
and other "yum" based Linux distributions.

Change-Id: I3e28f4f4f09e7387c97afc219899bba1927215e8
This commit is contained in:
Miguel Grinberg 2015-10-07 12:32:28 -07:00
parent 11ce6c7422
commit c03d6da8ec

View File

@ -41,7 +41,13 @@ info_block "Bootstrapping System with Ansible"
ssh_key_create
# Install the base packages
apt-get update && apt-get -y install git python-all python-dev curl autoconf g++ python2.7-dev
APT=`command -v apt-get` || true
YUM=`command -v yum` || true
if [[ "$APT" != "" ]]; then
apt-get update && apt-get -y install git python-all python-dev curl autoconf g++ python2.7-dev
elif [[ "$YUM" != "" ]]; then
yum check-update && yum -y install git python2 curl autoconf gcc-c++ python2-devel
fi
# If the working directory exists remove it
if [ -d "${ANSIBLE_WORKING_DIR}" ];then