1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-14 20:22:08 +00:00

Merge pull request #445 from iiab/master

Sync from iiab/iiab:master
This commit is contained in:
A Holt 2020-10-27 14:33:04 -07:00 committed by GitHub
commit a96be1d398
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 9 deletions

View file

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

View file

@ -27,18 +27,18 @@ SYSTEMD_NETWORKD="none"
# doesn't exist, or (2) iiab.env exists but fails to set STAGE=<something>
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)
# /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
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
# /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