Skip to content

Commit

Permalink
ansible test
Browse files Browse the repository at this point in the history
  • Loading branch information
jvonau committed Sep 9, 2020
1 parent 779dedd commit 931a68a
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions iiab-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -e # Exit on error (avoids snowballing)
export DEBIAN_FRONTEND=noninteractive # Bypass (most!) interactive questions
SCRIPT=iiab-upgrade
RELEASE=1
CURR_VER="" # Ansible version you currently have installed
GOOD_VER="2.9.13" # preferred Ansible version
BASEDIR=/opt/iiab
CONFDIR=/etc/iiab
IIABENV=$CONFDIR/iiab.env
Expand Down Expand Up @@ -254,13 +256,18 @@ echo -e " ███████████████████████
echo -e "\n"
# catch updates when apt runs
# add logic to force updates later
# 2.9.13 -> 2.10.X might need the removal of /etc/ansible/ansible.cfg
if [ $(command -v ansible-playbook) ]; then # "command -v" is POSIX compliant; also catches built-in commands like "cd"
CURR_VER=`ansible --version | head -1 | awk '{print $2}'` # To match iiab-install. Was: CURR_VER=`ansible --version | head -n 1 | cut -f 2 -d " "`
echo -e "CURRENTLY INSTALLED ANSIBLE: $CURR_VER skipping install!"
else
echo -e "Install Ansible..."
$BASEDIR/iiab/scripts/ansible
echo -e "CURRENTLY INSTALLED ANSIBLE: $CURR_VER"
if version_gt $CURR_VER $GOOD_VER; then
echo -e "$CURR_VER is >= $GOOD_VER, skipping install!"
else
echo -e "(Re)Install Ansible..."
$BASEDIR/iiab/scripts/ansible
fi
fi

echo -e "\n\n'apt update' is checking for OS updates...\n"
#echo -e "2019-07-11 TEMP WORKAROUND FOR RASPBIAN BUSTER'S testing->stable apt GLITCH...\nDetails @ https://github.com/iiab/iiab/issues/1856\n"
#apt -y update || true # Overrides 'set -e'
Expand Down

0 comments on commit 931a68a

Please sign in to comment.