From 1006b31a5f951eb0ef3c709baf667d74afe485ce Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Fri, 22 Sep 2017 05:12:06 -0400 Subject: [PATCH] workflow --- scripts/install_ansible | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/scripts/install_ansible b/scripts/install_ansible index 6631ebfb7..0a039c342 100755 --- a/scripts/install_ansible +++ b/scripts/install_ansible @@ -1,9 +1,8 @@ -#!/bin/bash -x +#!/bin/bash -e # required to start loading IIAB with ansible -set -e FOUND="" URL="NA" -if [ $(which ansible-playbookx) ]; then +if [ $(which ansible-playbook) ]; then echo "Ansible installed exiting..." exit 0 fi @@ -35,7 +34,7 @@ if [ -f /etc/olpc-release ]; then yum -y install python-pip python-setuptools python-wheel patch pip install --upgrade pip setuptools wheel #EOL just do it FOUND="yes" - FAMILY="debian" + FAMILY="olpc" fi if [ -f /etc/debian_version ]; then @@ -77,24 +76,20 @@ fi # latest pip 2.2 is 2.2.3.0 on 2017-07-07 # ansible-2.3.1.0-1.el7.noarch.rpm from 2017-06-01 - VER=`ansible --version|head -n 1|cut -f 2 -d " "` #(returns 2.3.1.0) 2017-07-07 - echo "ansible version installed via package manager $VER" ### start ansible pip install TODO add venv location /opt/iiab/anisble -if [ $FAMILY = "redhat" ]; then - # rpm -e ansible - # pip install ansible==2.3.1 --disable-pip-version-check +if [ $FAMILY = "olpc" ]; then + pip install ansible==2.2.1 --disable-pip-version-check + VER=`ansible --version|head -n 1|cut -f 2 -d " "` + echo "ansible version installed via pip $VER" fi -if [ $FAMILY = "debian" ]; then - # apt remove ansible - # pip install ansible==2.3.1 --disable-pip-version-check -fi -### - -### -# other pip upgrades here if needed -### +#if [ $FAMILY = "debian" ]; then +# rpm -e ansible +# pip install ansible==2.2.1 --disable-pip-version-check +#fi +VER=`ansible --version|head -n 1|cut -f 2 -d " "` +echo "ansible version installed via package manager $VER" #if [ $FAMILY = "debian" ]; then # echo 'WARN: Trying to install ansible via pip without some dependencies' @@ -105,3 +100,6 @@ mkdir -p /etc/ansible/ echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts ### end ansible routine +### +# other pip upgrades here if needed +###