diff --git a/scripts/ansible b/scripts/ansible index c74af4427..2e7875ea5 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -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 diff --git a/scripts/local_facts.fact b/scripts/local_facts.fact index bc16645f3..5b60bbe08 100755 --- a/scripts/local_facts.fact +++ b/scripts/local_facts.fact @@ -28,6 +28,7 @@ case $OS_VER in "ubuntu-17" | \ "ubuntu-18" | \ "ubuntu-19" | \ + "ubuntu-20" | \ "centos-7" | \ "raspbian-8" | \ "raspbian-9" | \