diff --git a/scripts/ansible b/scripts/ansible index c74af4427..62a231f0e 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -67,13 +67,14 @@ 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 ! [ `cat /etc/os-release | grep UBUNTU_CODENAME= | awk -F "=" '{print $2}'` == "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 - 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 + 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