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

Avoid problematic /usr/local/bin/apt on Linux Mint

This commit is contained in:
A Holt 2020-08-21 16:39:27 -04:00 committed by GitHub
parent 911b1cca73
commit e87afe3f5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"