mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
add patching routine
This commit is contained in:
parent
ce340e0d80
commit
ff1e3a2978
1 changed files with 15 additions and 3 deletions
|
@ -2,8 +2,10 @@
|
||||||
# required to start loading IIAB with ansible
|
# required to start loading IIAB with ansible
|
||||||
FOUND=""
|
FOUND=""
|
||||||
URL="NA"
|
URL="NA"
|
||||||
|
# TODO add check for version - to revese patching if upgrading
|
||||||
if [ $(which ansible-playbook) ]; then
|
if [ $(which ansible-playbook) ]; then
|
||||||
echo "Ansible installed exiting..."
|
VER=`ansible --version|head -n 1|cut -f 2 -d " "`
|
||||||
|
echo "Ansible $VER installed exiting..."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "Installing --- Please Wait"
|
echo "Installing --- Please Wait"
|
||||||
|
@ -84,12 +86,22 @@ if [ $FAMILY = "olpc" ]; then
|
||||||
echo "ansible version installed via pip $VER"
|
echo "ansible version installed via pip $VER"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# TODO add check for version to skip patching
|
||||||
|
# APPLY TEMPORARY PATCH
|
||||||
|
# https://github.com/ansible/ansible/pull/20202
|
||||||
|
# https://github.com/iiab/iiab/issues/249
|
||||||
|
if [ $FAMILY != "redhat" ]; then
|
||||||
|
echo "Patching..."
|
||||||
|
sed -i 's/StrictVersion/LooseVersion/g' /usr/lib/python2.7/dist-packages/ansible/modules/core/web_infrastructure/htpasswd.py
|
||||||
|
fi
|
||||||
|
VER=`ansible --version|head -n 1|cut -f 2 -d " "`
|
||||||
|
echo "ansible version installed via package manager $VER"
|
||||||
|
|
||||||
|
# sample only
|
||||||
#if [ $FAMILY = "debian" ]; then
|
#if [ $FAMILY = "debian" ]; then
|
||||||
# rpm -e ansible
|
# rpm -e ansible
|
||||||
# pip install ansible==2.2.1 --disable-pip-version-check
|
# pip install ansible==2.2.1 --disable-pip-version-check
|
||||||
#fi
|
#fi
|
||||||
VER=`ansible --version|head -n 1|cut -f 2 -d " "`
|
|
||||||
echo "ansible version installed via package manager $VER"
|
|
||||||
|
|
||||||
#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'
|
||||||
|
|
Loading…
Reference in a new issue