1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

rework the ubuntu-20 test

This commit is contained in:
Jerry Vonau 2020-03-15 02:42:26 -05:00
parent b0c9e19023
commit 8223ad9966

View file

@ -67,7 +67,8 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian
echo -e "\napt update; install dirmngr; PPA to /etc/apt/sources.list.d/iiab-ansible.list\n"
apt update
if ! [ `cat /etc/os-release | grep UBUNTU_CODENAME= | awk -F "=" '{print $2}'` == "focal"]; then
IS_U20?=`cat /etc/os-release | grep UBUNTU_CODENAME= | awk -F "=" '{print $2}'`
if [ "$IS_20?" != "focal" ]; then
apt -y install dirmngr
echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main" \
> /etc/apt/sources.list.d/iiab-ansible.list
@ -92,12 +93,11 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian
#wget http://download.iiab.io/packages/ansible_2.4.2.0-1ppa~xenial_all.deb
#apt -y --allow-downgrades install ./ansible_2.4.2.0-1ppa~xenial_all.deb
echo -e 'PPA source "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main"'
echo -e "successfully saved to /etc/apt/sources.list.d/iiab-ansible.list\n"
echo -e "IF *OTHER* ANSIBLE SOURCES APPEAR BELOW, PLEASE MANUALLY REMOVE THEM TO"
echo -e 'ENSURE ANSIBLE UPDATES CLEANLY: (then re-run this script to be sure!)\n'
grep '^deb .*ansible' /etc/apt/sources.list /etc/apt/sources.list.d/*.list | grep -v '^/etc/apt/sources.list.d/iiab-ansible.list:' || true # Override bash -e (instead of aborting at 1st error)
# echo -e 'PPA source "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main"'
# echo -e "successfully saved to /etc/apt/sources.list.d/iiab-ansible.list\n"
# echo -e "IF *OTHER* ANSIBLE SOURCES APPEAR BELOW, PLEASE MANUALLY REMOVE THEM TO"
# echo -e 'ENSURE ANSIBLE UPDATES CLEANLY: (then re-run this script to be sure!)\n'
# grep '^deb .*ansible' /etc/apt/sources.list /etc/apt/sources.list.d/*.list | grep -v '^/etc/apt/sources.list.d/iiab-ansible.list:' || true # Override bash -e (instead of aborting at 1st error)
else
echo -e "\nEXITING: Could not detect your OS (unsupported?)\n"
exit 1