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-09-07 03:25:56 -04:00 committed by GitHub
parent 85efa6c694
commit 4ef95dc027
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,9 +39,9 @@ if [ ! `command -v ansible-playbook` ]; then # "command -v" is POSIX compliant
# Parens are optional, but greatly clarify :)
elif (grep -qi ubuntu /etc/lsb-release 2> /dev/null) || (grep -qi ubuntu /etc/os-release); then
#apt -y install python-pip python-setuptools python-wheel patch # 2018-09-05: fails on @kananigit's Ubuntu 18.04/Server. Fix @ https://github.com/iiab/iiab/pull/1091
apt update
apt -y install software-properties-common # adds command "apt-add-repository"
apt-add-repository -y ppa:ansible/ansible # adds correct line to correct file e.g. adds line "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main" to /etc/apt/sources.list.d/ansible-ubuntu-ansible-bionic.list
#apt-add-repository -y ppa:ansible/ansible-2.4
# elif UBUNTU MUST REMAIN ABOVE (as Ubuntu ALSO contains /etc/debian_version, which would trigger the line just below)
elif [ -f /etc/debian_version ] || (grep -qi raspbian /etc/*elease) ; then
if ( ! grep -qi ansible /etc/apt/sources.list) && [ ! -f /etc/apt/sources.list.d/ansible ]; then
@ -77,7 +77,7 @@ else
echo -e '\nThe latest Ansible will be installed using line "deb http://ppa.launchpad.net/ansible/ansible/ubuntu ... main" correctly found in /etc/apt/sources.list and/or /etc/apt/sources.list.d/*.list'
echo -e '\nIF *OTHER* ANSIBLE REPOS ARE ALSO FOUND BELOW, PLEASE MANUALLY REMOVE THEM TO ENSURE ANSIBLE UPDATES CLEANLY: (then re-run this script to be sure!)\n'
grep ansible /etc/apt/sources.list /etc/apt/sources.list.d/*.list
echo -e '\n'
echo
else
echo -e '\nEXITING: Ansible repo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu ... main" not found in /etc/apt/sources.list or /etc/apt/sources.list.d/*.list'
echo -e '\nPLEASE UNINSTALL ANSIBLE (run "apt purge ansible" or "pip uninstall ansible", depending how Ansible was originally installed) THEN RE-RUN THIS SCRIPT.'
@ -87,7 +87,7 @@ fi
if [ ! -f /etc/centos-release ] && [ ! -f /etc/fedora-release ] && [ ! -f /etc/olpc-release ]; then
# Align IIAB with Ansible community's latest official release
echo -e "Using apt to check for updates, then install/upgrade ansible:\n"
echo -e "\nUsing apt to check for updates, then install/upgrade ansible:\n"
apt update
apt -y --allow-downgrades install ansible