1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

stach thoughts

This commit is contained in:
Jerry Vonau 2017-09-17 16:11:23 -05:00
parent e6f8d6d314
commit dd6c91b3d0

View file

@ -17,6 +17,9 @@ if [ -f /etc/fedora-release ]; then
FOUND="yes"
FAMILY="redhat"
fi
# might have to revisit dependencies with a redhat dialect
# ansible python-kerberos python-selinux python-winrm python-xmltodict sshpass bzip2 file findutils gzip tar unzip zip python-keyczar python-boto python-dnspython python-pyrax python-sphere
if [ -f /etc/centos-release ]; then
yum -y upgrade
yum -y install ca-certificates nss epel-release
@ -36,7 +39,8 @@ if [ -f /etc/olpc-release ]; then
fi
if [ -f /etc/debian_version ]; then
# echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" >> /etc/apt/sources.list
# might pickup usbmount
echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" >> /etc/apt/sources.list
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
# apt-get update
# apt-get install ansible git python-pip python-setuptools python-wheel patch
@ -69,7 +73,9 @@ if [ ! $FOUND = "yes" ]; then
exit 1
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
if [ $FAMILY = "redhat" ]; then
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"
@ -78,6 +84,7 @@ fi
### start pip isolation
if [ $FAMILY = "debian" ]; then
VER=`ansible --version|head -n 1|cut -f 2 -d " "` #(returns 2.3.1.0) 2017-07-07
apt-get install python-pip python-setuptools python-wheel patch
fi
###
@ -86,12 +93,11 @@ fi
#pip upgrades here if needed
###
# latest 2.2 is 2.2.3.0 2017-07-07
if [ $FAMILY = "debian" ]; then
#if [ $FAMILY = "debian" ]; then
# echo 'WARN: Trying to install ansible via pip without some dependencies'
# echo 'WARN: Not all functionality of ansible may be available'
pip install ansible==2.3.1 --disable-pip-version-check
fi
# pip install ansible==2.3.1 --disable-pip-version-check
#fi
mkdir -p /etc/ansible/
echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts