From 720985fef6e97b7734a38ff8e6e7ff3ce3d95da0 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 27 Oct 2020 12:37:29 -0400 Subject: [PATCH 1/4] For now revert MongoDB repo from groovy to focal (for Ubuntu 20.10, 21.04, 21.10) until the next LTS in 2022 --- roles/mongodb/tasks/install.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/mongodb/tasks/install.yml b/roles/mongodb/tasks/install.yml index fe6a65df1..7d0bad888 100644 --- a/roles/mongodb/tasks/install.yml +++ b/roles/mongodb/tasks/install.yml @@ -96,7 +96,11 @@ - name: Use mongodb-org's Ubuntu repo for all non-Mint Ubuntu - 64bit only apt_repository: - repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/4.4 multiverse + # 2020-10-27: https://repo.mongodb.org/apt/ubuntu/dists/ supports only + # {focal 20.04, bionic 18.04, xenial 16.04, trusty 14.04, precise 12.04} + # so other Ubuntu's like groovy 20.10 need to revert to recent LTS repo: + repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse + #repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/4.4 multiverse state: present filename: mongodb-org when: is_ubuntu and not is_linuxmint From b80714540ae1a7f0c284a6be57cef32472286b44 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 27 Oct 2020 14:03:55 -0400 Subject: [PATCH 2/4] Fix in scripts/local_facts.fact for Mint --- scripts/local_facts.fact | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/local_facts.fact b/scripts/local_facts.fact index 0f84c1232..85df68811 100755 --- a/scripts/local_facts.fact +++ b/scripts/local_facts.fact @@ -27,7 +27,9 @@ SYSTEMD_NETWORKD="none" # doesn't exist, or (2) iiab.env exists but fails to set STAGE= source /etc/iiab/iiab.env || true # STAGE var auto-set, so no "if" required. -if tmp=$(grep ^ID= /etc/*elease); then +# /etc/lsb-release could also be grep'd. But /etc/upstream-release/lsb-release +# on Linux Mint 20 caused grep of /etc/*elease to fail (on directory not file) +if tmp=$(grep ^ID= /etc/os-release); then OS=$(echo $tmp | cut -d= -f2) OS=${OS//\"/} # Remove all '"' fi @@ -35,8 +37,6 @@ if [ -f /etc/rpi-issue ]; then OS="raspbian" fi -# /etc/lsb-release could also be grep'd. But /etc/upstream-release/lsb-release -# on Linux Mint 20 caused grep of /etc/*elease to fail (on directory not file) if tmp=$(grep ^VERSION_ID= /etc/os-release); then VERSION_ID=$(echo $tmp | cut -d= -f2) VERSION_ID=${VERSION_ID//\"/} # Remove all '"' From 01f048c54d780174b5141340a132733202a532ea Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 27 Oct 2020 16:57:56 -0400 Subject: [PATCH 3/4] Update local_facts.fact --- scripts/local_facts.fact | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/local_facts.fact b/scripts/local_facts.fact index 85df68811..9959a30d8 100755 --- a/scripts/local_facts.fact +++ b/scripts/local_facts.fact @@ -34,8 +34,8 @@ if tmp=$(grep ^ID= /etc/os-release); then OS=${OS//\"/} # Remove all '"' fi if [ -f /etc/rpi-issue ]; then - OS="raspbian" -fi + OS="raspbian" # For 64-bit Raspberry Pi OS which contains "ID=debian" as +fi # of 2020: https://github.com/raspberrypi/Raspberry-Pi-OS-64bit/issues/6 if tmp=$(grep ^VERSION_ID= /etc/os-release); then VERSION_ID=$(echo $tmp | cut -d= -f2) From d1e53db826d5a2f0c0cf1dba2c72001f49e18352 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 27 Oct 2020 17:17:40 -0400 Subject: [PATCH 4/4] Quoting vars is safer...on these 3 lines --- scripts/local_facts.fact | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/local_facts.fact b/scripts/local_facts.fact index 0f84c1232..427bb255a 100755 --- a/scripts/local_facts.fact +++ b/scripts/local_facts.fact @@ -28,7 +28,7 @@ SYSTEMD_NETWORKD="none" source /etc/iiab/iiab.env || true # STAGE var auto-set, so no "if" required. if tmp=$(grep ^ID= /etc/*elease); then - OS=$(echo $tmp | cut -d= -f2) + OS=$(echo "$tmp" | cut -d= -f2) OS=${OS//\"/} # Remove all '"' fi if [ -f /etc/rpi-issue ]; then @@ -38,7 +38,7 @@ fi # /etc/lsb-release could also be grep'd. But /etc/upstream-release/lsb-release # on Linux Mint 20 caused grep of /etc/*elease to fail (on directory not file) if tmp=$(grep ^VERSION_ID= /etc/os-release); then - VERSION_ID=$(echo $tmp | cut -d= -f2) + VERSION_ID=$(echo "$tmp" | cut -d= -f2) VERSION_ID=${VERSION_ID//\"/} # Remove all '"' VERSION_ID=${VERSION_ID%%.*} # Remove all '.' & stuff to the right of em fi @@ -85,7 +85,7 @@ tmp=$(cat /proc/device-tree/model) && RPI_MODEL=$tmp tmp=$(ansible --version) && - ANSIBLE_VERSION=$(echo $tmp | head -n 1 | cut -f 2 -d " ") + ANSIBLE_VERSION=$(echo "$tmp" | head -n 1 | cut -f 2 -d " ") # THESE LAST 3 ARE DIFFEENT as "systemctl is-enabled" unhelpfully returns the