From 4890eeb64e7e086b6f83032c03513b645f9785d7 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Fri, 22 Sep 2017 02:50:44 -0500 Subject: [PATCH] slim down install, workflow, and notes/thoughts --- scripts/install_ansible | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/scripts/install_ansible b/scripts/install_ansible index 8ede3d923..6631ebfb7 100755 --- a/scripts/install_ansible +++ b/scripts/install_ansible @@ -3,7 +3,7 @@ set -e FOUND="" URL="NA" -if [ $(which ansible-playbook) ]; then +if [ $(which ansible-playbookx) ]; then echo "Ansible installed exiting..." exit 0 fi @@ -39,31 +39,33 @@ if [ -f /etc/olpc-release ]; then fi if [ -f /etc/debian_version ]; then -# might pickup usbmount - echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" >> /etc/apt/sources.list +# might pickup usbmount confirm ppa location +# 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 - apt-get install 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 + apt-get install ansible git python-pip python-setuptools python-wheel patch +# apt-get install 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 FOUND="yes" FAMILY="debian" fi if [ `grep -qi ubuntu /etc/lsb-release` ] || [ `grep -qi ubuntu /etc/os-release` ]; then apt-get update +# confirm PPA location # apt-get install software-properties-common # apt-add-repository ppa:ansible/ansible # apt-get update -# apt-get install ansible git python-pip python-setuptools python-wheel patch - apt-get install 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 + apt-get install ansible git python-pip python-setuptools python-wheel patch +# apt-get install 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 FOUND="yes" FAMILY="debian" fi +# Has 2.2.1 if [ `grep -qi raspbian /etc/*elease` ]; then apt-get update # 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 - apt-get install 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 + apt-get install ansible git python-pip python-setuptools python-wheel patch +# apt-get install 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 FOUND="yes" FAMILY="debian" fi @@ -75,22 +77,23 @@ 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" - # rpm -e ansible + +### 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 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 + # apt remove ansible + # pip install ansible==2.3.1 --disable-pip-version-check fi ### ### -#pip upgrades here if needed +# other pip upgrades here if needed ### #if [ $FAMILY = "debian" ]; then