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:
parent
fce0b482cb
commit
aafc29d185
1 changed files with 10 additions and 0 deletions
|
@ -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..."
|
||||
|
|
Loading…
Reference in a new issue