mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #2805 from holta/ansible-pip-force-upgrade
scripts/ansible attempts to upgrade Ansible (functionality restored)
This commit is contained in:
commit
ec26bbfece
1 changed files with 6 additions and 7 deletions
|
@ -15,7 +15,7 @@ GOOD_VER=2.11.1 # Orig for 'yum install [rpm]' & XO laptops (pip install)
|
|||
# delays in publishing the PPA (.deb installer files) for ansible-core, this
|
||||
# file bypasses the apt approach (and associated PPA source) in favor of:
|
||||
#
|
||||
# pip3 install ansible-core
|
||||
# pip3 install --upgrade ansible-core
|
||||
#
|
||||
# What the future holds for 2022+ is not yet clear. So the apt approach (with
|
||||
# PPA source in /etc/apt/sources.list.d/ and .gpg key etc) and much associated
|
||||
|
@ -55,7 +55,7 @@ fi
|
|||
# TEMPORARILY USE pip3 to install the latest ansible-core as listed at
|
||||
# https://pypi.org/project/ansible-core/ (REMOVE W/ "pip3 uninstall ansible-core")
|
||||
#apt install python3-pymysql python3-psycopg2 python3-passlib python3-pip python3-setuptools python3-packaging python3-venv virtualenv
|
||||
#pip3 install ansible-core # Then start a new shell, so /usr/local/bin works
|
||||
#pip3 install --upgrade ansible-core # Then start a new shell, so /usr/local/bin works
|
||||
#ansible-galaxy collection install -r collections.yml
|
||||
|
||||
# TEMPORARILY USE ansible-base 2.10.10 (REMOVE W/ "pip3 uninstall ansible-base")
|
||||
|
@ -96,8 +96,7 @@ if [ $(command -v ansible) ]; then # "command -v" is POSIX compliant; also ca
|
|||
# Above works with 'ansible [core 2.11.0rc2]' -- these old ways do not:
|
||||
#CURR_VER=$(ansible --version | head -1 | awk '{print $2}')
|
||||
#CURR_VER=$(ansible --version | head -1 | sed -e 's/.* //')
|
||||
echo -e "CURRENTLY INSTALLED ANSIBLE: $CURR_VER"
|
||||
#echo -e "CURRENTLY INSTALLED ANSIBLE: $CURR_VER -- LET'S TRY TO UPGRADE IT!"
|
||||
echo -e "CURRENTLY INSTALLED ANSIBLE: $CURR_VER -- LET'S TRY TO UPGRADE IT!"
|
||||
else
|
||||
echo -e "ANSIBLE NOT FOUND ON THIS COMPUTER -- LET'S TRY TO INSTALL IT!"
|
||||
fi
|
||||
|
@ -153,12 +152,12 @@ echo -e "\napt update; apt install of python3-* / virtualenv packages explained
|
|||
echo -e "https://github.com/iiab/iiab/blob/master/scripts/ansible.md\n"
|
||||
$APT_PATH/apt update
|
||||
#$APT_PATH/apt -y --allow-downgrades install ansible-core \
|
||||
$APT_PATH/apt -y --allow-downgrades install \
|
||||
$APT_PATH/apt -y install \
|
||||
python3-pymysql python3-psycopg2 python3-passlib python3-pip \
|
||||
python3-setuptools python3-packaging python3-venv virtualenv
|
||||
|
||||
echo -e "\n\n'pip3 install ansible-core' will now run:\n"
|
||||
pip3 install ansible-core
|
||||
echo -e "\n\n'pip3 install --upgrade ansible-core' will now run:\n"
|
||||
pip3 install --upgrade ansible-core
|
||||
|
||||
# (Re)running collection installs appears safe, with --force-with-deps to force
|
||||
# upgrade of collection and dependencies it pulls in. Note Ansible may support
|
||||
|
|
Loading…
Add table
Reference in a new issue