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

enable ansible ppa for version 2.4.0

This commit is contained in:
Jerry Vonau 2017-09-27 13:32:47 -05:00
parent 649ebb5081
commit c7df5eb93d

View file

@ -51,8 +51,8 @@ fi
if [ -f /etc/debian_version ]; then if [ -f /etc/debian_version ]; then
# might pickup usbmount confirm ppa location # might pickup usbmount confirm ppa location
# echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" >> /etc/apt/sources.list echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial 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 -y update apt-get -y update
apt-get -y install ansible git python-pip python-setuptools python-wheel patch apt-get -y 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 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
@ -60,10 +60,12 @@ if [ -f /etc/debian_version ]; then
FAMILY="debian" FAMILY="debian"
fi fi
if [ `grep -qi ubuntu /etc/lsb-release` ] || [ `grep -qi ubuntu /etc/os-release` ]; then if [ `grep -qi ubuntu /etc/lsb-release` ] || [ `grep -qi ubuntu /etc/os-release` ]; then
echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" >> /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
apt-get -y update apt-get -y update
# confirm PPA location # confirm PPA location
apt-get install software-properties-common # apt-get install software-properties-common
apt-add-repository ppa:ansible/ansible # apt-add-repository ppa:ansible/ansible
# apt-get update # apt-get update
apt-get -y install ansible git python-pip python-setuptools python-wheel patch apt-get -y 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 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
@ -72,8 +74,8 @@ if [ `grep -qi ubuntu /etc/lsb-release` ] || [ `grep -qi ubuntu /etc/os-release
fi fi
# Has 2.2.1 # Has 2.2.1
if [ `grep -qi raspbian /etc/*elease` ]; then if [ `grep -qi raspbian /etc/*elease` ]; then
apt-get update echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial 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 -y update apt-get -y update
apt-get -y install ansible git python-pip python-setuptools python-wheel patch apt-get -y 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 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
@ -100,10 +102,10 @@ fi
# APPLY TEMPORARY PATCH # APPLY TEMPORARY PATCH
# https://github.com/ansible/ansible/pull/20202 # https://github.com/ansible/ansible/pull/20202
# https://github.com/iiab/iiab/issues/249 # https://github.com/iiab/iiab/issues/249
if [ $FAMILY != "redhat" ]; then #if [ $FAMILY != "redhat" ]; then
echo "Patching..." # echo "Patching..."
sed -i 's/StrictVersion/LooseVersion/g' /usr/lib/python2.7/dist-packages/ansible/modules/core/web_infrastructure/htpasswd.py # sed -i 's/StrictVersion/LooseVersion/g' /usr/lib/python2.7/dist-packages/ansible/modules/core/web_infrastructure/htpasswd.py
fi #fi
VER=`ansible --version|head -n 1|cut -f 2 -d " "` VER=`ansible --version|head -n 1|cut -f 2 -d " "`
echo "ansible version installed via package manager $VER" echo "ansible version installed via package manager $VER"