From 1bea516feaa4976c1848370f50015f6c7952ed37 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Tue, 1 Sep 2020 05:13:20 -0500 Subject: [PATCH 01/12] Mint might need static mapping to Ubuntu --- roles/mongodb/tasks/install.yml | 9 ++++++++- vars/default_vars.yml | 4 ++++ vars/linuxmint-20.yml | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/roles/mongodb/tasks/install.yml b/roles/mongodb/tasks/install.yml index 6fdbc4a34..08537680f 100644 --- a/roles/mongodb/tasks/install.yml +++ b/roles/mongodb/tasks/install.yml @@ -91,7 +91,14 @@ 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 + when: is_ubuntu and not is_mint + + - name: Add mongodb repo for Mint 64bit only + apt_repository: + repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse + state: present + filename: mongodb-org + when: is_mint_20 - name: "Install packages: mongodb-org, mongodb-org-server" package: diff --git a/vars/default_vars.yml b/vars/default_vars.yml index d731c05e9..d02498f39 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -704,6 +704,10 @@ is_ubuntu_18: False is_ubuntu_17: False is_ubuntu_16: False +is_mint: False # subset of is_ubuntu +is_mint_20: False + + is_debian: False # Covers both: Debian, Raspbian (Raspberry Pi OS) is_debian_10: False is_debian_9: False diff --git a/vars/linuxmint-20.yml b/vars/linuxmint-20.yml index f58ba79ed..5ed252e7d 100644 --- a/vars/linuxmint-20.yml +++ b/vars/linuxmint-20.yml @@ -1,6 +1,9 @@ is_debuntu: True is_ubuntu: True is_ubuntu_20: True +is_mint: True +is_mint_20: True + # 2019-03-23: These apply if-only-if named_install and/or dhcpd_install are True # (This is quite rare now that vars/default_vars.yml sets dnsmasq_install: True) From 287307fb98acbad1a542ffe659bfe3ad5fabbc68 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Tue, 1 Sep 2020 06:00:32 -0500 Subject: [PATCH 02/12] wording and ordering --- roles/mongodb/tasks/install.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/roles/mongodb/tasks/install.yml b/roles/mongodb/tasks/install.yml index 08537680f..0e07ca746 100644 --- a/roles/mongodb/tasks/install.yml +++ b/roles/mongodb/tasks/install.yml @@ -71,7 +71,7 @@ args: warn: false - - name: Add mongodb repo for Debian 10 (only amd64 support available) + - name: Use mongodb-org's Debian buster repo for Debian 10 (only amd64 support available) apt_repository: repo: deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main state: present @@ -79,27 +79,27 @@ when: is_debian_10 and (ansible_architecture == "x86_64") # Debian 10 aarch64 might work below but is blocked in main.yml - - name: Add mongodb repo for RaspOS-aarch64 + - name: Use mongodb-org's Ubuntu bionic repo for RaspOS-aarch64 apt_repository: repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 multiverse state: present filename: mongodb-org when: (ansible_architecture == "aarch64" and is_raspbian_10) - - name: Add mongodb repo for Ubuntu 64bit only - apt_repository: - 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_mint - - - name: Add mongodb repo for Mint 64bit only + - name: Use mongodb-org's Ubuntu focal repo for Mint 20 - 64bit only apt_repository: repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse state: present filename: mongodb-org when: is_mint_20 + - name: Use mongodb-org's Ubuntu repo for Ubuntu all - 64bit only + apt_repository: + 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_mint + - name: "Install packages: mongodb-org, mongodb-org-server" package: name: From bf7ac7ab360306363e84513a89146ba748a811e4 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 1 Sep 2020 21:22:06 -0400 Subject: [PATCH 03/12] mongodb/tasks/install.yml revisions --- roles/mongodb/tasks/install.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/roles/mongodb/tasks/install.yml b/roles/mongodb/tasks/install.yml index 0e07ca746..c65597cbb 100644 --- a/roles/mongodb/tasks/install.yml +++ b/roles/mongodb/tasks/install.yml @@ -57,14 +57,15 @@ with_items: - { src: 'mongod.conf.j2', dest: "{{ mongodb_conf }}", mode: '0644' } # i.e. /etc/mongod.conf - # end block when: not (ansible_architecture == "x86_64" or ansible_architecture == "aarch64") + # 32 bit OS's get caught above should handle aarch32 including 32-bit ubuntu # from https://ubuntu.com/download/raspberry-pi. 20.4-32bit might fail untested # 32bit intel might puke as this was orginally deployed for raspbian. Haven't # see bootable 32bit intel installers for a while now. # 64 bit OS's proceed below. + - block: - name: Add mongodb.org signing key (only 64-bit support available) shell: wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add - @@ -84,21 +85,21 @@ repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 multiverse state: present filename: mongodb-org - when: (ansible_architecture == "aarch64" and is_raspbian_10) + when: (ansible_architecture == "aarch64" and is_raspbian) - - name: Use mongodb-org's Ubuntu focal repo for Mint 20 - 64bit only + - name: Use mongodb-org's Ubuntu focal repo for Linux Mint - 64bit only apt_repository: repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse state: present filename: mongodb-org - when: is_mint_20 + when: is_linuxmint | bool - - name: Use mongodb-org's Ubuntu repo for Ubuntu all - 64bit only + - 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 state: present filename: mongodb-org - when: is_ubuntu and not is_mint + when: is_ubuntu and not is_linuxmint - name: "Install packages: mongodb-org, mongodb-org-server" package: @@ -152,6 +153,7 @@ enabled: no state: restarted + # 3. RECORD MongoDB AS INSTALLED - name: "Set 'mongodb_installed: True'" From 14ae2fe84108ea8d09e51f8737f0e33af9a70296 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 1 Sep 2020 21:23:15 -0400 Subject: [PATCH 04/12] Update linuxmint-20.yml --- vars/linuxmint-20.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vars/linuxmint-20.yml b/vars/linuxmint-20.yml index 5ed252e7d..b0702943a 100644 --- a/vars/linuxmint-20.yml +++ b/vars/linuxmint-20.yml @@ -1,9 +1,8 @@ is_debuntu: True is_ubuntu: True is_ubuntu_20: True -is_mint: True -is_mint_20: True - +is_linuxmint: True +is_linuxmint_20: True # 2019-03-23: These apply if-only-if named_install and/or dhcpd_install are True # (This is quite rare now that vars/default_vars.yml sets dnsmasq_install: True) From 1af27bb2e785cfe479455de5492d6acdd2681887 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 1 Sep 2020 21:28:19 -0400 Subject: [PATCH 05/12] Update default_vars.yml --- vars/default_vars.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index d02498f39..0be9f94ac 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -695,25 +695,24 @@ calibreweb_home: "{{ content_base }}/calibre-web" # /library/calibre-web # Works" ~30 lines below, and https://github.com/iiab/iiab/wiki/IIAB-Platforms # Wide to narrow (insofar as poss) -is_debuntu: False # Covers all 3: Ubuntu, Debian, Raspbian (Raspberry Pi OS) +is_debuntu: False # Covers all 4: Ubuntu, Linux Mint, Debian, Raspberry Pi OS (Raspbian) -is_ubuntu: False +is_ubuntu: False # Covers: Ubuntu, Linux Mint is_ubuntu_20: False is_ubuntu_19: False is_ubuntu_18: False is_ubuntu_17: False is_ubuntu_16: False -is_mint: False # subset of is_ubuntu -is_mint_20: False +is_linuxmint: False # Subset of is_ubuntu +is_linuxmint_20: False - -is_debian: False # Covers both: Debian, Raspbian (Raspberry Pi OS) +is_debian: False # Covers both: Debian, Raspberry Pi OS (Raspbian) is_debian_10: False is_debian_9: False is_debian_8: False -is_raspbian: False # Covers both: RPi HW + non-RPi HW versions of Raspbian (Raspberry Pi OS) +is_raspbian: False # Covers both: RPi HW + non-RPi HW versions of Raspberry Pi OS (Raspbian) is_raspbian_10: False is_raspbian_9: False is_raspbian_8: False From 04048550524e433faae72a7b1b8836c34f0e2bdb Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 1 Sep 2020 21:50:00 -0400 Subject: [PATCH 06/12] Likewise is_debian_10 -> is_debian ain't no crystal ball...but at least permits testing future distros --- roles/mongodb/tasks/install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/mongodb/tasks/install.yml b/roles/mongodb/tasks/install.yml index c65597cbb..143a10838 100644 --- a/roles/mongodb/tasks/install.yml +++ b/roles/mongodb/tasks/install.yml @@ -72,12 +72,12 @@ args: warn: false - - name: Use mongodb-org's Debian buster repo for Debian 10 (only amd64 support available) + - name: Use mongodb-org's Debian buster repo for Debian (only amd64 support available) apt_repository: repo: deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main state: present filename: mongodb-org - when: is_debian_10 and (ansible_architecture == "x86_64") + when: is_debian and (ansible_architecture == "x86_64") # Debian 10 aarch64 might work below but is blocked in main.yml - name: Use mongodb-org's Ubuntu bionic repo for RaspOS-aarch64 From ca4b59c3ecc0e70ebcf6cc5f5732a8d3047e4413 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 1 Sep 2020 22:37:54 -0400 Subject: [PATCH 07/12] mongodb/tasks/install.yml Debian revision, thanks to @jvonau's https://github.com/iiab/iiab/pull/2499/commits/d6a3c589ca954934ccfabc451cbcab8a5272f187 --- roles/mongodb/tasks/install.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/mongodb/tasks/install.yml b/roles/mongodb/tasks/install.yml index 143a10838..eb40db071 100644 --- a/roles/mongodb/tasks/install.yml +++ b/roles/mongodb/tasks/install.yml @@ -72,9 +72,9 @@ args: warn: false - - name: Use mongodb-org's Debian buster repo for Debian (only amd64 support available) + - name: Use mongodb-org's Debian repo for Debian (only amd64 support available) apt_repository: - repo: deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main + repo: deb http://repo.mongodb.org/apt/debian {{ ansible_distribution_release }}/mongodb-org/4.4 main state: present filename: mongodb-org when: is_debian and (ansible_architecture == "x86_64") @@ -85,7 +85,7 @@ repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 multiverse state: present filename: mongodb-org - when: (ansible_architecture == "aarch64" and is_raspbian) + when: is_raspbian and (ansible_architecture == "aarch64") - name: Use mongodb-org's Ubuntu focal repo for Linux Mint - 64bit only apt_repository: From 8fc732e1e4f24c012c4a8a73cefb8fe93f3fec90 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 1 Sep 2020 22:42:11 -0400 Subject: [PATCH 08/12] Get Real...admit we no longer support 11 distro/versions...to strengthen support for our core 4 OS's --- scripts/local_facts.fact | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/local_facts.fact b/scripts/local_facts.fact index 21c8727cf..4fde0e53b 100755 --- a/scripts/local_facts.fact +++ b/scripts/local_facts.fact @@ -22,20 +22,20 @@ DHCPCD_PATH=`which dhcpcd` NM_PATH=`which NetworkManager` case $OS_VER in - "fedora-18" | \ - "fedora-22" | \ - "debian-8" | \ - "debian-9" | \ + #"fedora-18" | \ + #"fedora-22" | \ + #"debian-8" | \ + #"debian-9" | \ "debian-10" | \ - "ubuntu-16" | \ - "ubuntu-17" | \ - "ubuntu-18" | \ - "ubuntu-19" | \ + #"ubuntu-16" | \ + #"ubuntu-17" | \ + #"ubuntu-18" | \ + #"ubuntu-19" | \ "ubuntu-20" | \ "linuxmint-20" | \ - "centos-7" | \ - "raspbian-8" | \ - "raspbian-9" | \ + #"centos-7" | \ + #"raspbian-8" | \ + #"raspbian-9" | \ "raspbian-10") ;; *) OS_VER="OS_not_supported" From 6451c98031b5c6b43ea0cb54f28b70c922e266ba Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 2 Sep 2020 14:32:20 -0400 Subject: [PATCH 09/12] Update default_vars.yml --- vars/default_vars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index 0be9f94ac..a4b45c9ca 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -731,7 +731,7 @@ is_fedora_18: False # 2. Ansible runs /etc/ansible/facts.d/local_facts.fact to identify the OS # 3. The correct /opt/iiab/iiab/vars/.yml is then invoked by any the # following high-level scripts in /opt/iiab/iiab for IIAB operators: -# ./iiab-install (uses iiab-stages.yml +# ./iiab-install (uses iiab-stages.yml) # ./iiab-network (uses iiab-network.yml) # ./runrole (uses run-one-role.yml) # 4. Likewise behind the scenes: From 5db1c4a66836fc17a7901b40c439c95e8d9d48fe Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 2 Sep 2020 14:39:19 -0400 Subject: [PATCH 10/12] local_facts.fact: bash was failing on comments in case statement --- scripts/local_facts.fact | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/local_facts.fact b/scripts/local_facts.fact index 4fde0e53b..35b409493 100755 --- a/scripts/local_facts.fact +++ b/scripts/local_facts.fact @@ -21,21 +21,23 @@ OS_VER=$OS-$VERSION_ID DHCPCD_PATH=`which dhcpcd` NM_PATH=`which NetworkManager` -case $OS_VER in +# Previously supported Linux distributions / versions: #"fedora-18" | \ #"fedora-22" | \ #"debian-8" | \ #"debian-9" | \ - "debian-10" | \ #"ubuntu-16" | \ #"ubuntu-17" | \ #"ubuntu-18" | \ #"ubuntu-19" | \ - "ubuntu-20" | \ - "linuxmint-20" | \ #"centos-7" | \ #"raspbian-8" | \ #"raspbian-9" | \ + +case $OS_VER in + "debian-10" | \ + "ubuntu-20" | \ + "linuxmint-20" | \ "raspbian-10") ;; *) OS_VER="OS_not_supported" From e38d0ad1399d1a1e0cd3deebed88590037dc0c05 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 2 Sep 2020 20:03:15 -0400 Subject: [PATCH 11/12] Revert to installing the latest Ansible As Ansible 2.9.13 is tested to install BIG-sized IIAB, unlike 2.9.12 & 2.10.0 which suffer from the #2481 permissions issue. --- scripts/ansible | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index c7f83b78e..0aafd9f27 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -70,12 +70,12 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian echo -e "\napt update; install dirmngr; PPA to /etc/apt/sources.list.d/iiab-ansible.list\n" $APT_PATH/apt update $APT_PATH/apt -y install dirmngr - #echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main" \ - # > /etc/apt/sources.list.d/iiab-ansible.list + echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main" \ + > /etc/apt/sources.list.d/iiab-ansible.list # 2020-08-20: TEMP WORKAROUND (REVERT TO ANSIBLE 2.9.6) MITIGATING #2481 (Ansible 2.9.12 and 2.10.0's 666-TO-600 file permissions problem). This installs 2.9.6-1ppa~disco onto RaspiOS, from https://launchpad.net/~ansible/+archive/ubuntu/ansible - echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu disco main" \ - > /etc/apt/sources.list.d/iiab-ansible.list + #echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu disco main" \ + # > /etc/apt/sources.list.d/iiab-ansible.list 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 From 5bf92874cbbbf56cbc221d293aabde8e35477628 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 3 Sep 2020 18:28:15 -0400 Subject: [PATCH 12/12] Gitea 1.12.3 -> 1.12.4 --- roles/gitea/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/gitea/defaults/main.yml b/roles/gitea/defaults/main.yml index a19a2506a..b21a68bdc 100644 --- a/roles/gitea/defaults/main.yml +++ b/roles/gitea/defaults/main.yml @@ -9,7 +9,7 @@ # Info needed to install Gitea: -gitea_version: 1.12.3 +gitea_version: 1.12.4 iset_suffixes: i386: 386 x86_64: amd64