1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00
This commit is contained in:
Jerry Vonau 2017-09-22 05:12:06 -04:00
parent 4890eeb64e
commit 1006b31a5f

View file

@ -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
###