From dd6c91b3d0343ee94760def57664458af9cdef70 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sun, 17 Sep 2017 16:11:23 -0500 Subject: [PATCH] stach thoughts --- scripts/install_ansible | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/scripts/install_ansible b/scripts/install_ansible index e7db96e19..8ede3d923 100755 --- a/scripts/install_ansible +++ b/scripts/install_ansible @@ -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