mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
better undo patching - notes
This commit is contained in:
parent
54b4a3c2b0
commit
fd1fb25d06
1 changed files with 8 additions and 3 deletions
|
@ -1,11 +1,15 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
# required to start loading IIAB with ansible
|
# required to start loading IIAB with ansible
|
||||||
FOUND=""
|
FOUND=""
|
||||||
|
VER=""
|
||||||
|
# below are unused for future use
|
||||||
|
GOOD_VER=""
|
||||||
URL="NA"
|
URL="NA"
|
||||||
# TODO add check for version - to revese patching if upgrading
|
# TODO add check for version - to revese patching if upgrading
|
||||||
if [ $(which ansible-playbook) ]; then
|
if [ $(which ansible-playbook) ]; then
|
||||||
VER=`ansible --version|head -n 1|cut -f 2 -d " "`
|
VER=`ansible --version|head -n 1|cut -f 2 -d " "`
|
||||||
GOOD_VER=`echo $VER | grep ^2.4 | wc -l`
|
GOOD_VER=`echo $VER | grep ^2.4`
|
||||||
|
# 2.2.0.0 -> 2.4.0 patching was not applied -just upgrade via pip
|
||||||
if [ $VER = "2.2.0.0" ]; then
|
if [ $VER = "2.2.0.0" ]; then
|
||||||
echo "Ansible $VER installed updating to 2.4.0"
|
echo "Ansible $VER installed updating to 2.4.0"
|
||||||
pip install --upgrade ansible==2.4.0 --disable-pip-version-check
|
pip install --upgrade ansible==2.4.0 --disable-pip-version-check
|
||||||
|
@ -105,9 +109,10 @@ if [ $FAMILY = "olpc" ]; then
|
||||||
echo "ansible version installed via pip $VER"
|
echo "ansible version installed via pip $VER"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# handle 2.2.1 2.2.0.0 <-> 2.4.0
|
# handle 2.2.1 -> 2.4.0 deb install undo patching
|
||||||
|
# unsure if install above will upgrade or skip - cover that now
|
||||||
if [ $FAMILY = "debian" ]; then
|
if [ $FAMILY = "debian" ]; then
|
||||||
if [ $GOOD_VER -lt 1 ]; then
|
if [ ! $VER == "" ]; then
|
||||||
sed -i 's/LooseVersion/StrictVersion/g' /usr/lib/python2.7/dist-packages/ansible/modules/core/web_infrastructure/htpasswd.py
|
sed -i 's/LooseVersion/StrictVersion/g' /usr/lib/python2.7/dist-packages/ansible/modules/core/web_infrastructure/htpasswd.py
|
||||||
apt-get -y upgrade ansible
|
apt-get -y upgrade ansible
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue