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

Warnings Strengthened

This commit is contained in:
A Holt 2018-06-20 09:56:30 -04:00 committed by GitHub
parent 1e556aac2d
commit 164b9d5a69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,20 +53,21 @@ if [ ! `command -v ansible-playbook` ]; then # "command -v" is POSIX compliant
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 "Current ansible version installed is $CURR_VER"
echo "Currently installed Ansible version is $CURR_VER"
echo "Internet-in-a-Box generally requires Ansible version $GOOD_VER or higher."
if [ -f /etc/centos-release ] || [ -f /etc/fedora-release ]; then
echo "Please use your system's package manager to update ansible"
echo "Please use your system's package manager (or pip if necessary) to update Ansible."
exit 0
elif [ -f /etc/olpc-release ]; then
echo "Please use pip package manager to update ansible"
echo "Please use pip package manager to update Ansible."
exit 0
#fi
#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: ANSIBLE 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 '\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'
else
echo "Upstream ansible source repo not found, please uninstall ansible and re-run this script"
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.'
exit 1
fi
fi