1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00

Merge pull request #2291 from jvonau/ansible

ubuntu 20 ansible workaround
This commit is contained in:
A Holt 2020-03-19 10:56:35 -04:00 committed by GitHub
commit a03b253a00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 14 deletions

View file

@ -64,16 +64,21 @@ elif [ -f /etc/centos-release ]; then
#elif [ -f /etc/debian_version ] || (grep -qi raspbian /etc/*elease) ; then
#elif [ ! -f /etc/centos-release ] && [ ! -f /etc/fedora-release ] && [ ! -f /etc/olpc-release ]; then
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
apt -y install dirmngr # Raspbian needs. Formerly: python-pip python-setuptools python-wheel patch
echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main" \
if ! grep -q focal /etc/os-release; then
echo -e "\napt update; install dirmngr; PPA to /etc/apt/sources.list.d/iiab-ansible.list\n"
apt update
apt -y install dirmngr
echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main" \
> /etc/apt/sources.list.d/iiab-ansible.list
echo -e '\nIF YOU FACE ERROR "signatures couldn'"'"'t be verified because the public key is not available" THEN REPEATEDLY RE-RUN "sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 93C4A3FD7BB9C367"\n'
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 93C4A3FD7BB9C367
echo -e '\nIF YOU FACE ERROR "signatures couldn'"'"'t be verified because the public key is not available" THEN REPEATEDLY RE-RUN "sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 93C4A3FD7BB9C367"\n'
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 93C4A3FD7BB9C367
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)
fi
echo -e "\napt update; apt install ansible and python3 dependencies explained at:"
echo -e "https://github.com/iiab/iiab/tree/master/scripts/ansible.md\n"
apt update
@ -91,12 +96,6 @@ 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)
else
echo -e "\nEXITING: Could not detect your OS (unsupported?)\n"
exit 1

View file

@ -28,6 +28,7 @@ case $OS_VER in
"ubuntu-17" | \
"ubuntu-18" | \
"ubuntu-19" | \
"ubuntu-20" | \
"centos-7" | \
"raspbian-8" | \
"raspbian-9" | \