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" FOUND="yes"
FAMILY="redhat" FAMILY="redhat"
fi 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 if [ -f /etc/centos-release ]; then
yum -y upgrade yum -y upgrade
yum -y install ca-certificates nss epel-release yum -y install ca-certificates nss epel-release
@ -36,7 +39,8 @@ if [ -f /etc/olpc-release ]; then
fi fi
if [ -f /etc/debian_version ]; then 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-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
# apt-get update # apt-get update
# apt-get install ansible git python-pip python-setuptools python-wheel patch # apt-get install ansible git python-pip python-setuptools python-wheel patch
@ -69,7 +73,9 @@ if [ ! $FOUND = "yes" ]; then
exit 1 exit 1
fi 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 # ansible-2.3.1.0-1.el7.noarch.rpm from 2017-06-01
if [ $FAMILY = "redhat" ]; then if [ $FAMILY = "redhat" ]; then
VER=`ansible --version|head -n 1|cut -f 2 -d " "` #(returns 2.3.1.0) 2017-07-07 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" echo "ansible version installed via package manager $VER"
@ -78,6 +84,7 @@ fi
### start pip isolation ### start pip isolation
if [ $FAMILY = "debian" ]; then 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 apt-get install python-pip python-setuptools python-wheel patch
fi fi
### ###
@ -86,12 +93,11 @@ fi
#pip upgrades here if needed #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: Trying to install ansible via pip without some dependencies'
# echo 'WARN: Not all functionality of ansible may be available' # echo 'WARN: Not all functionality of ansible may be available'
pip install ansible==2.3.1 --disable-pip-version-check # pip install ansible==2.3.1 --disable-pip-version-check
fi #fi
mkdir -p /etc/ansible/ mkdir -p /etc/ansible/
echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts