From 409e8bc468a07cd00f372be2e2d0a60e827eda6e Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 22 Jun 2021 08:20:02 -0400 Subject: [PATCH 1/3] Recommend ansible-core 2.11.2 --- scripts/ansible | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index 1c1f48675..b190c1ec0 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -9,7 +9,7 @@ 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.11.1 # Orig for 'yum install [rpm]' & XO laptops (pip install) +GOOD_VER=2.11.2 # Orig for 'yum install [rpm]' & XO laptops (pip install) # 2021-05-19 PR #2743: As a result of Ansible / Red Hat / IBM's extensive # delays in publishing the PPA (.deb installer files) for ansible-core, this @@ -34,6 +34,7 @@ fi # APRIL 2021 - ansible-base (2.10) was renamed to ansible-core (2.11+): # https://www.ansible.com/blog/ansible-3.0.0-qa # https://github.com/ansible/ansible/releases +# https://github.com/ansible/ansible/commits/stable-2.11 # https://pypi.org/project/ansible-base/ # https://pypi.org/project/ansible-core/ # https://releases.ansible.com/ansible-base/ @@ -58,13 +59,13 @@ fi #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") +# TEMPORARILY USE ansible-base 2.10.11 (REMOVE W/ "pip3 uninstall ansible-base") #apt install python3-pip -#pip3 install ansible-base==2.10.10 # Start new shell, so /usr/local/bin works +#pip3 install ansible-base==2.10.11 # Start new shell, so /usr/local/bin works -# TEMPORARILY USE ANSIBLE 2.9.22 (REMOVE IT WITH "pip3 uninstall ansible") +# TEMPORARILY USE ANSIBLE 2.9.23 (REMOVE IT WITH "pip3 uninstall ansible") #apt install python3-pip -#pip3 install ansible==2.9.22 +#pip3 install ansible==2.9.23 # TEMPORARILY USE ANSIBLE 2.4.2 DUE TO 2.4.3 MEMORY BUG. Details: iiab/iiab#669 #echo "Install http://download.iiab.io/packages/ansible_2.4.2.0-1ppa~xenial_all.deb" From 16efa3c4cf44ceecdf5ff5f49bf872fc14ac2a37 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 22 Jun 2021 08:40:38 -0400 Subject: [PATCH 2/3] scripts/ansible: Comment out unused code --- scripts/ansible | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index b190c1ec0..bec364678 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -11,25 +11,25 @@ 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.11.2 # Orig for 'yum install [rpm]' & XO laptops (pip install) +# 2021-06-22: The apt approach (with PPA source in /etc/apt/sources.list.d/ and +# .gpg key etc) are commented out with ### below. Asociated guidance/comments +# are intentionally preserved. + # 2021-05-19 PR #2743: As a result of Ansible / Red Hat / IBM's extensive # 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 --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 -# guidance/comments below are NOT being commented out or deleted at this time. # 2021-02-25: Latest 'ansible-base' was being installed from PPA, using either # OS 'CODENAME' below: https://launchpad.net/~ansible/+archive/ubuntu/ansible # 'lsb_release -sc' gives Mint 20 codename 'ulyana' etc: (TOO FINE-GRAINED) -if grep -q buster /etc/os-release /etc/debian_version; then - CODENAME=bionic # Debian 10, RaspiOS 10 & Buster-like distros -else - CODENAME=focal # Debian 11+, RaspiOS 11+, Ubuntu 20.04+, Mint 20+ (ETC) -fi +###if grep -q buster /etc/os-release /etc/debian_version; then +### CODENAME=bionic # Debian 10, RaspiOS 10 & Buster-like distros +###else +### CODENAME=focal # Debian 11+, RaspiOS 11+, Ubuntu 20.04+, Mint 20+ (ETC) +###fi # APRIL 2021 - ansible-base (2.10) was renamed to ansible-core (2.11+): # https://www.ansible.com/blog/ansible-3.0.0-qa @@ -121,8 +121,8 @@ fi #$APT_PATH/apt update #$APT_PATH/apt -y install dirmngr #echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu $CODENAME main" \ -echo "deb [signed-by=/usr/share/keyrings/iiab-ansible-keyring.gpg] http://ppa.launchpad.net/ansible/ansible/ubuntu $CODENAME main" \ - > /etc/apt/sources.list.d/iiab-ansible.list +###echo "deb [signed-by=/usr/share/keyrings/iiab-ansible-keyring.gpg] http://ppa.launchpad.net/ansible/ansible/ubuntu $CODENAME main" \ +### > /etc/apt/sources.list.d/iiab-ansible.list # In future we might instead consider 'add-apt-repository ppa:ansible/ansible' # or 'apt-add-repository ppa:ansible/bionic/ansible' etc, e.g. for streamlined @@ -140,14 +140,14 @@ echo "deb [signed-by=/usr/share/keyrings/iiab-ansible-keyring.gpg] http://ppa.la # 2021-04-26: JV & @holta WIP: (see above) #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 -cp /opt/iiab/iiab/scripts/iiab-ansible-keyring.gpg /usr/share/keyrings/iiab-ansible-keyring.gpg +###cp /opt/iiab/iiab/scripts/iiab-ansible-keyring.gpg /usr/share/keyrings/iiab-ansible-keyring.gpg #chmod 644 /usr/share/keyrings/iiab-ansible-keyring.gpg -echo -e 'PPA source "deb [signed-by=/usr/share/keyrings/iiab-ansible-keyring.gpg] http://ppa.launchpad.net/ansible/ansible/ubuntu '$CODENAME' main"' -echo -e "successfully saved to /etc/apt/sources.list.d/iiab-ansible.list\n" -echo -e "IF *OTHER* ANSIBLE SOURCES APPEAR BELOW, PLEASE MANUALLY REMOVE THEM TO" -echo -e 'ENSURE ANSIBLE UPDATES CLEANLY: (then re-run this script to be sure!)\n' -grep '^deb .*ansible' /etc/apt/sources.list /etc/apt/sources.list.d/*.list | grep -v '^/etc/apt/sources.list.d/iiab-ansible.list:' || true # Override bash -e (instead of aborting at 1st error) +###echo -e 'PPA source "deb [signed-by=/usr/share/keyrings/iiab-ansible-keyring.gpg] http://ppa.launchpad.net/ansible/ansible/ubuntu '$CODENAME' main"' +###echo -e "successfully saved to /etc/apt/sources.list.d/iiab-ansible.list\n" +###echo -e "IF *OTHER* ANSIBLE SOURCES APPEAR BELOW, PLEASE MANUALLY REMOVE THEM TO" +###echo -e 'ENSURE ANSIBLE UPDATES CLEANLY: (then re-run this script to be sure!)\n' +###grep '^deb .*ansible' /etc/apt/sources.list /etc/apt/sources.list.d/*.list | grep -v '^/etc/apt/sources.list.d/iiab-ansible.list:' || true # Override bash -e (instead of aborting at 1st error) echo -e "\napt update; apt install of python3-* / virtualenv packages explained at:" echo -e "https://github.com/iiab/iiab/blob/master/scripts/ansible.md\n" From 14b7e23ca0b98044f0920a0665439e499a63cbf7 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 22 Jun 2021 08:41:37 -0400 Subject: [PATCH 3/3] Typo in scripts/ansible --- scripts/ansible | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ansible b/scripts/ansible index bec364678..0ec33185a 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -12,7 +12,7 @@ CURR_VER=undefined # Ansible version you currently have installed GOOD_VER=2.11.2 # Orig for 'yum install [rpm]' & XO laptops (pip install) # 2021-06-22: The apt approach (with PPA source in /etc/apt/sources.list.d/ and -# .gpg key etc) are commented out with ### below. Asociated guidance/comments +# .gpg key etc) are commented out with ### below. Associated guidance/comments # are intentionally preserved. # 2021-05-19 PR #2743: As a result of Ansible / Red Hat / IBM's extensive