From cd299ee1cebb5eef5a6fc6ff6c9b65fa6e542956 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Wed, 15 Aug 2018 23:25:53 -0500 Subject: [PATCH] Extend the embedded bootstap process The embedded bootstrap process can support all of our OS's, this change ensures thats possible. Change-Id: I730bb775aa5e9f87609ea885142d7361203cbb2c Signed-off-by: Kevin Carter --- elk_metrics_6x/bootstrap-embedded-ansible.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/elk_metrics_6x/bootstrap-embedded-ansible.sh b/elk_metrics_6x/bootstrap-embedded-ansible.sh index 6079c9c5..d1e14ebf 100755 --- a/elk_metrics_6x/bootstrap-embedded-ansible.sh +++ b/elk_metrics_6x/bootstrap-embedded-ansible.sh @@ -19,15 +19,18 @@ OPTS+=('ANSIBLE_EMBED_HOME') source /etc/os-release if [[ ! -e "${ANSIBLE_EMBED_HOME}/bin/ansible" ]]; then - if [ ${VERSION_ID} = "14.04" ]; then + if [ ${ID} = "ubuntu" ]; then apt-get update apt-get -y install python-virtualenv - echo "done installing python-virtualenv" + elif [ ${ID} = "opensuse" ]; then + zypper install -y python-virtualenv + elif [ ${ID} = "centos" ] || [ ${ID} ="redhat" ]; then + yum install -y python-virtualenv else - apt-get update - apt-get -y install python3-virtualenv python-virtualenv - echo "done installing python-virtualenv python3-virtualenv" + echo "Unknown operating system" + exit 99 fi + echo "done installing python-virtualenv" if [[ -f "/usr/bin/python2" ]]; then virtualenv --python="/usr/bin/python2" "${ANSIBLE_EMBED_HOME}" elif [[ -f "/usr/bin/python3" ]]; then