From 89a8b106c2033eb7d3298d6fa32e0a2f0d37d65a Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 27 May 2021 11:43:42 -0400 Subject: [PATCH 1/2] scripts/ansible attempts to upgrade of Ansible (functionality restored) --- scripts/ansible | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index 30531ed28..9fe8fb330 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -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 From df8f3b0d455da9a76dceed9d603f89ab53e14583 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 27 May 2021 11:47:23 -0400 Subject: [PATCH 2/2] scripts/ansible: Doc touchup --- scripts/ansible | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ansible b/scripts/ansible index 9fe8fb330..7a484e338 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -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