1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-14 20:22:08 +00:00

Update ansible

This commit is contained in:
A Holt 2018-06-20 10:13:34 -04:00 committed by GitHub
parent 2c1c1efe4a
commit 516510c4c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,8 +2,8 @@
echo -e '\nATTEMPTING TO INSTALL THE LATEST (RELEASED VERSION OF) ANSIBLE.'
echo -e 'Ensure you'"'"'re online before running this! (/opt/iiab/iiab/scripts/ansible)'
echo -e 'ALTERNATIVE: consider scripts/ansible/2.5.x "slow food" instead.'
echo -e 'INSTRUCTIONS: https://github.com/iiab/iiab/wiki/IIAB-Installation#do-everything-from-scratch\n'
echo -e 'ALTERNATIVES: consider scripts/ansible-2.5.x "slow food" instead.'
GOOD_VER="2.5.4" # Ansible version for OLPC XO laptops (pip install).
# On other OS's we install/upgrade to THE latest (released version of) Ansible.
@ -55,7 +55,7 @@ else
#CURR_VER=`ansible --version | head -n 1 | cut -f 2 -d " "`
CURR_VER=`ansible --version | head -1 | awk '{print $2}'` # to match iiab-install
echo "Currently installed Ansible version is: $CURR_VER"
echo "Internet-in-a-Box generally requires Ansible version: $GOOD_VER or higher"
echo -e "INTERNET-IN-A-BOX GENERALLY REQUIRES ANSIBLE VERSION: $GOOD_VER or higher\n"
if [ -f /etc/centos-release ] || [ -f /etc/fedora-release ]; then
echo "Please use your system's package manager (or pip if necessary) to update Ansible."
exit 0
@ -66,9 +66,9 @@ else
#if [[ `grep -qi ansible /etc/apt/sources.list` ]] || [ -f /etc/apt/sources.list.d/ansible*.list ]; then
elif (grep -qi ansible /etc/apt/sources.list) || (ls /etc/apt/sources.list.d/*ansible*.list >/dev/null 2>&1) ; then
#echo "Ansible repo(s) found within /etc/apt/sources.list*"
echo -e '\nMANUAL INTERVENTION URGED:\nANSIBLE REPO(S) FOUND WITHIN /etc/apt/sources.list AND/OR /etc/apt/sources.list.d/*ansible*.list -- MUST CONTAIN LINE "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" IF YOU WANT THE LATEST RELEASED VERSION OF ANSIBLE -- then re-run this script.\n'
echo -e 'MANUAL INTERVENTION URGED:\nANSIBLE REPO(S) FOUND WITHIN /etc/apt/sources.list AND/OR /etc/apt/sources.list.d/*ansible*.list -- MUST CONTAIN LINE "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" IF YOU WANT THE LATEST RELEASED VERSION OF ANSIBLE -- then re-run this script.\n'
else
echo -e '\nUpstream ansible source repo not found:\nPLEASE UNINSTALL ANSIBLE (run "apt purge ansible" or "pip uninstall ansible", depending how Ansible was originally installed) THEN RE-RUN THIS SCRIPT.'
echo -e 'Upstream ansible source repo not found:\nPLEASE UNINSTALL ANSIBLE (run "apt purge ansible" or "pip uninstall ansible", depending how Ansible was originally installed) THEN RE-RUN THIS SCRIPT.'
exit 1
fi
fi