mirror of
https://github.com/iiab/iiab.git
synced 2025-02-14 20:22:08 +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
|
||||
FOUND=""
|
||||
URL="NA"
|
||||
# TODO add check for version - to revese patching if upgrading
|
||||
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
|
||||
fi
|
||||
echo "Installing --- Please Wait"
|
||||
|
@ -84,12 +86,22 @@ if [ $FAMILY = "olpc" ]; then
|
|||
echo "ansible version installed via pip $VER"
|
||||
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
|
||||
# rpm -e ansible
|
||||
# pip install ansible==2.2.1 --disable-pip-version-check
|
||||
#fi
|
||||
VER=`ansible --version|head -n 1|cut -f 2 -d " "`
|
||||
echo "ansible version installed via package manager $VER"
|
||||
|
||||
#if [ $FAMILY = "debian" ]; then
|
||||
# echo 'WARN: Trying to install ansible via pip without some dependencies'
|
||||
|
|
Loading…
Reference in a new issue