1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-15 04:32:11 +00:00

add upgrade check

This commit is contained in:
Jerry Vonau 2017-09-27 00:10:24 -05:00
parent fce0b482cb
commit aafc29d185

View file

@ -3,6 +3,16 @@
FOUND=""
URL="NA"
# TODO add check for version - to revese patching if upgrading
if [ $(which ansible-playbook) ]; then
VER=`ansible --version|head -n 1|cut -f 2 -d " "`
if [ $VER="2.2.0.0" ]; then
echo "Ansible $VER installed updating"
pip install --upgrade ansible==2.2.1 --disable-pip-version-check
sed -i 's/StrictVersion/LooseVersion/g' /usr/lib/python2.7/dist-packages/ansible/modules/core/web_infrastructure/htpasswd.py
fi
exit 0
fi
# TODO add check for version - to revese patching if upgrading
if [ $(which ansible-playbook) ]; then
VER=`ansible --version|head -n 1|cut -f 2 -d " "`
echo "Ansible $VER installed exiting..."