diff --git a/scripts/ansible b/scripts/ansible index 427cee045..b884c1238 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -1,5 +1,6 @@ #!/bin/bash -e +APT_PATH=/usr/bin # Avoids problematic /usr/local/bin/apt on Linux Mint CURR_VER="undefined" # Ansible version you currently have installed GOOD_VER="2.9.6" # For XO laptops (pip install) & CentOS (yum install rpm) # On other OS's we attempt the latest from PPA, which might be more recent @@ -66,8 +67,8 @@ elif [ -f /etc/centos-release ]; then elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian 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 + $APT_PATH/apt update + $APT_PATH/apt -y install dirmngr echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main" \ > /etc/apt/sources.list.d/iiab-ansible.list @@ -90,8 +91,8 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian 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 - apt -y --allow-downgrades install ansible python3-pymysql python3-psycopg2 \ + $APT_PATH/apt update + $APT_PATH/apt -y --allow-downgrades install ansible python3-pymysql python3-psycopg2 \ python3-passlib python3-pip python3-setuptools python3-venv virtualenv echo -e "\nSUCCESS: verify Ansible using 'ansible --version' and/or 'apt -a list ansible'\n\n"