From c849249ca4cc75389e506955bebbed6f63e27f56 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 28 Nov 2020 15:18:19 -0500 Subject: [PATCH 01/95] 1-prep/tasks/main.yml sections: less doomscrolling, more readability --- roles/1-prep/tasks/main.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/roles/1-prep/tasks/main.yml b/roles/1-prep/tasks/main.yml index 4cf2ba2cd..9953016bd 100644 --- a/roles/1-prep/tasks/main.yml +++ b/roles/1-prep/tasks/main.yml @@ -7,6 +7,7 @@ include_tasks: roles/network/tasks/dnsmasq.yml #when: dnsmasq_install # Flag might be used in future? + - name: Install uuid-runtime package (debuntu) package: name: @@ -37,13 +38,6 @@ set_fact: uuid: "{{ stored_uuid.stdout_lines[0] }}" -#- name: Does directory /ro exist? (indicating OS is Ubermix) -# stat: -# path: /ro -# register: ro_dir - -#- debug: -# var: ro_dir - name: Does 'ubermix' exist in /etc/lsb-release? shell: grep -i ubermix /etc/lsb-release # Pipe to cat to avoid red errors? @@ -52,9 +46,6 @@ #ignore_errors: True #check_mode: no -#- debug: -# var: grep_ubermix - - name: If so, install /etc/tmpfiles.d/iiab.conf to create /var/log subdirs on each boot, so {Apache, MongoDB, Munin} run on Ubermix copy: src: roles/1-prep/files/iiab.conf @@ -64,7 +55,6 @@ # mode: '0644' force: yes when: grep_ubermix.rc == 0 # 1 if absent in file, 2 if file doesn't exist - #when: ro_dir.stat.exists # 2020-03-19: for KA Lite, but moved from roles/kalite/tasks/install.yml # This effectively does nothing at all on Ubuntu & Raspbian, where libgeos-* @@ -75,6 +65,7 @@ shell: apt -y remove "libgeos-*" when: grep_ubermix.rc == 0 # 1 if absent in file, 2 if file doesn't exist + # Required by OpenVPN below. Also run by roles/4-server-options/tasks/main.yml - name: SSHD include_role: @@ -91,6 +82,7 @@ name: openvpn when: openvpn_install + # Debian 10 "Buster" is apparently enabling AppArmor in 2019: # https://wiki.debian.org/AppArmor/Progress # https://wiki.debian.org/AppArmor/HowToUse @@ -116,6 +108,7 @@ # command: setenforce Permissive # when: not is_debuntu and selinux_disabled is defined and selinux_disabled.changed + ## DISCOVER PLATFORMS ###### # Put conditional actions for hardware platforms here - include_tasks: raspberry_pi.yml @@ -133,6 +126,7 @@ timeout: "{{ download_timeout }}" when: internet_available and usb_NUC6.stdout|int > 0 + # this script can be sourced to get IIAB location - name: Recording STAGE 1 HAS COMPLETED ============================ template: From 850aedd8083ab97cd106ed8138715887e3ac8596 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 28 Nov 2020 17:09:04 -0500 Subject: [PATCH 02/95] scripts/ansible: --force-with-deps -r collections.yml -p /usr/share/ansible/collections --- scripts/ansible | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index bfd02e073..4336fa1c1 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -95,12 +95,7 @@ $APT_PATH/apt -y --allow-downgrades install ansible-base \ # upgrade of collection and dependencies it pulls in. Note Ansible may support # upgrading all collections cleanly in future. See PR #2652 (links) & PR #2653 echo -e "\n\nIIAB requires these 3 Ansible Collections: (we upgrade them here if possible!)\n" -ansible-galaxy collection install --force-with-deps community.general -ansible-galaxy collection install --force-with-deps community.mysql -ansible-galaxy collection install --force-with-deps ansible.posix # For 3 below -# selinux WAS in /opt/iiab/iiab/roles/1-prep/tasks/main.yml -# sysctl in /opt/iiab/iiab/roles/2-common/tasks/main.yml -# synchronize in /opt/iiab/iiab-admin-console/roles/js-menu/tasks/main.yml +ansible-galaxy collection install --force-with-deps -r collections.yml -p /usr/share/ansible/collections echo -e "\n\nCreating/verifying directory /etc/ansible & installing /etc/ansible/hosts\n" mkdir -p /etc/ansible From bca8d56457c90a111701be74bc0832a410439c24 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 28 Nov 2020 17:19:58 -0500 Subject: [PATCH 03/95] Create collections.yml (listing the Ansible Collections that IIAB requires) --- collections.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 collections.yml diff --git a/collections.yml b/collections.yml new file mode 100644 index 000000000..77c100ee3 --- /dev/null +++ b/collections.yml @@ -0,0 +1,13 @@ +# IIAB requires the Ansible Collections listed below. Explanations here: +# http://FAQ.IIAB.IO > "What is Ansible and what version should I use?" +# https://github.com/iiab/iiab/blob/master/scripts/ansible.md + +--- +collections: + - name: community.general + - name: community.mysql + - name: ansible.posix # 2020-11-28: For ~3 modules below... + +# selinux WAS in /opt/iiab/iiab/roles/1-prep/tasks/main.yml +# sysctl in /opt/iiab/iiab/roles/2-common/tasks/main.yml +# synchronize in /opt/iiab/iiab-admin-console/roles/js-menu/tasks/main.yml From 55f07071873e81f029802560fd8c1a9907bb39bb Mon Sep 17 00:00:00 2001 From: root Date: Sat, 28 Nov 2020 22:39:00 +0000 Subject: [PATCH 04/95] scripts/ansible: Explain /usr/share/ansible/collections/ansible_collections --- scripts/ansible | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/ansible b/scripts/ansible index 4336fa1c1..81facc937 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -96,6 +96,10 @@ $APT_PATH/apt -y --allow-downgrades install ansible-base \ # upgrading all collections cleanly in future. See PR #2652 (links) & PR #2653 echo -e "\n\nIIAB requires these 3 Ansible Collections: (we upgrade them here if possible!)\n" ansible-galaxy collection install --force-with-deps -r collections.yml -p /usr/share/ansible/collections +# 2020-11-28: The ~3 Ansible Collections (~37MB) used by IIAB used to be here: +# /root/.ansible/collections/ansible_collections +# But going forward they'll be stored here: +# /usr/share/ansible/collections/ansible_collections echo -e "\n\nCreating/verifying directory /etc/ansible & installing /etc/ansible/hosts\n" mkdir -p /etc/ansible From 105bbdc0b9b02e453fba583dc1e8650662dec91f Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 28 Nov 2020 20:27:53 -0500 Subject: [PATCH 05/95] ansible-galaxy -r /opt/iiab/iiab/collections.yml --- scripts/ansible | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ansible b/scripts/ansible index 81facc937..d6a8ad263 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -95,7 +95,7 @@ $APT_PATH/apt -y --allow-downgrades install ansible-base \ # upgrade of collection and dependencies it pulls in. Note Ansible may support # upgrading all collections cleanly in future. See PR #2652 (links) & PR #2653 echo -e "\n\nIIAB requires these 3 Ansible Collections: (we upgrade them here if possible!)\n" -ansible-galaxy collection install --force-with-deps -r collections.yml -p /usr/share/ansible/collections +ansible-galaxy collection install --force-with-deps -r /opt/iiab/iiab/collections.yml -p /usr/share/ansible/collections # 2020-11-28: The ~3 Ansible Collections (~37MB) used by IIAB used to be here: # /root/.ansible/collections/ansible_collections # But going forward they'll be stored here: From f4b0adc1d6462a3af68178eb9d80f57bc767c424 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 28 Nov 2020 20:41:18 -0500 Subject: [PATCH 06/95] Identify OS from /etc/os-release to avoid stumbling on Mint directory /etc/upstream-release (same as scripts/local_facts.fact) --- iiab-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iiab-install b/iiab-install index 261893cf3..f4d45d05c 100755 --- a/iiab-install +++ b/iiab-install @@ -8,7 +8,7 @@ INVENTORY=ansible_hosts IIAB_STATE_FILE=/etc/iiab/iiab_state.yml ARGS="" CWD=`pwd` -OS=`grep ^ID= /etc/*release|cut -d= -f2` +OS=`grep ^ID= /etc/os-release | cut -d= -f2` OS=${OS//\"/} MIN_RPI_KERN=4.19.97 # If using Raspbian, 'rpi-update' should no longer be nec -- please use Raspbian 2020-02-13 or higher: https://github.com/iiab/iiab/issues/1993 MIN_ANSIBLE_VER=2.8.11 # Ansible 2.8.3 and 2.8.6 have serious bugs, preventing their use with IIAB. From 5314234167def1093b592fa0a1cafe222742e724 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 28 Nov 2020 20:55:20 -0500 Subject: [PATCH 07/95] scripts/ansible: Mention PRs #2647 #2652 #2653 #2655 --- scripts/ansible | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index d6a8ad263..64fb9cc0f 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -93,12 +93,12 @@ $APT_PATH/apt -y --allow-downgrades install ansible-base \ # (Re)running collection installs appears safe, with --force-with-deps to force # upgrade of collection and dependencies it pulls in. Note Ansible may support -# upgrading all collections cleanly in future. See PR #2652 (links) & PR #2653 -echo -e "\n\nIIAB requires these 3 Ansible Collections: (we upgrade them here if possible!)\n" +# upgrading all collections cleanly in future. See PRs #2647 #2652 #2653 #2655 +echo -e "\n\nIIAB requires these ~3 Ansible Collections: (we upgrade them here if possible!)\n" ansible-galaxy collection install --force-with-deps -r /opt/iiab/iiab/collections.yml -p /usr/share/ansible/collections -# 2020-11-28: The ~3 Ansible Collections (~37MB) used by IIAB used to be here: +# 2020-11-28: The ~3 Ansible Collections used by IIAB (~37MB) once lived here: # /root/.ansible/collections/ansible_collections -# But going forward they'll be stored here: +# But going forward they'll be stored herein: # /usr/share/ansible/collections/ansible_collections echo -e "\n\nCreating/verifying directory /etc/ansible & installing /etc/ansible/hosts\n" From a3fc75d9ef8675522f7b84bc114af7d82d0871fc Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 28 Nov 2020 21:18:58 -0500 Subject: [PATCH 08/95] scripts/ansible: code readability --- scripts/ansible | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index 64fb9cc0f..0bc127605 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -15,8 +15,8 @@ GOOD_VER="2.10.3" # Orig for 'yum install [rpm]' & XO laptops (pip install) # IIAB implementers might instead consider these 2 GENERAL TECHNIQUES below # ("in an emergency!") e.g. if you must install an older version of Ansible: -# TEMPORARILY USE ANSIBLE 2.9.13 (REMOVE IT WITH "pip uninstall ansible") -#pip install ansible==2.9.13 +# TEMPORARILY USE ANSIBLE 2.9.15 (REMOVE IT WITH "pip uninstall ansible") +#pip install ansible==2.9.15 # 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" @@ -95,7 +95,9 @@ $APT_PATH/apt -y --allow-downgrades install ansible-base \ # upgrade of collection and dependencies it pulls in. Note Ansible may support # upgrading all collections cleanly in future. See PRs #2647 #2652 #2653 #2655 echo -e "\n\nIIAB requires these ~3 Ansible Collections: (we upgrade them here if possible!)\n" -ansible-galaxy collection install --force-with-deps -r /opt/iiab/iiab/collections.yml -p /usr/share/ansible/collections +ansible-galaxy collection install --force-with-deps \ + -r /opt/iiab/iiab/collections.yml \ + -p /usr/share/ansible/collections # 2020-11-28: The ~3 Ansible Collections used by IIAB (~37MB) once lived here: # /root/.ansible/collections/ansible_collections # But going forward they'll be stored herein: From 43e5672bc0e32f81021bf8f88e3ae0f2eadcdcd7 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 28 Nov 2020 22:38:41 -0500 Subject: [PATCH 09/95] 1-prep/tasks/main.yml: Mention PR #2654 (AppArmor works w/ IIAB on Debian 10/11, so also now on Ubuntu?) --- roles/1-prep/tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/1-prep/tasks/main.yml b/roles/1-prep/tasks/main.yml index 9953016bd..d24b49764 100644 --- a/roles/1-prep/tasks/main.yml +++ b/roles/1-prep/tasks/main.yml @@ -90,6 +90,7 @@ # Curiously this has NOT stopped IIAB 7.0/master from working on Debian 10 # pre-releases, during @floydianslips' March 2019 testing anyway! SEE #1387 +# PR #2654 - AppArmor works w/ IIAB on Debian 10/11, so also now on Ubuntu? #- name: Disable AppArmor -- override OS default (ubuntu) # systemd: # name: apparmor From 652da0fbbd47d22c671127e498c8e1d3951d6e0f Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 28 Nov 2020 23:18:35 -0500 Subject: [PATCH 10/95] 1-prep/tasks/main.yml: final code/comment cleanup for PR #2654 merge --- roles/1-prep/tasks/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/1-prep/tasks/main.yml b/roles/1-prep/tasks/main.yml index d24b49764..273aedc94 100644 --- a/roles/1-prep/tasks/main.yml +++ b/roles/1-prep/tasks/main.yml @@ -99,6 +99,7 @@ # when: is_ubuntu # ignore_errors: True +# PR #2648 - Can be restored in future if truly nec, w ansible.posix collection #- name: Disable SELinux on next boot (OS's other than debuntu) # selinux: # state: disabled @@ -112,6 +113,7 @@ ## DISCOVER PLATFORMS ###### # Put conditional actions for hardware platforms here + - include_tasks: raspberry_pi.yml when: first_run and rpi_model != "none" @@ -128,7 +130,7 @@ when: internet_available and usb_NUC6.stdout|int > 0 -# this script can be sourced to get IIAB location +# This script can be sourced to get IIAB path/location - name: Recording STAGE 1 HAS COMPLETED ============================ template: src: roles/1-prep/templates/iiab.env.j2 From 11eeda5b4c3566e11709d3b52c9f2e05fd5344bb Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 2 Dec 2020 02:09:24 -0500 Subject: [PATCH 11/95] Gitea 1.12.6 -> 1.13.0 --- 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 8d1d9a9ac..126020cc2 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.6 +gitea_version: 1.13.0 iset_suffixes: i386: 386 x86_64: amd64 From 0ae0a9db5ee023a66911ed0aee955aaded3bc158 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 3 Dec 2020 18:23:18 -0500 Subject: [PATCH 12/95] Moodle 3.9 -> 3.10 --- roles/moodle/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/moodle/defaults/main.yml b/roles/moodle/defaults/main.yml index d3163b3d5..2bb7fe704 100644 --- a/roles/moodle/defaults/main.yml +++ b/roles/moodle/defaults/main.yml @@ -7,7 +7,7 @@ # All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml # If nec, change them by editing /etc/iiab/local_vars.yml prior to installing! -moodle_version: 39 +moodle_version: 310 moodle_repo_url: https://github.com/moodle/moodle.git #moodle_repo_url: git://git.moodle.org/moodle.git # 2020-10-16: VERY Slow! moodle_base: "{{ iiab_base }}/moodle" # /opt/iiab From 5f1244e2f2671d4f4eb5b943c407f700546d6e17 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 3 Dec 2020 20:49:22 -0500 Subject: [PATCH 13/95] Moodle 3.10 requires pkg: php{{ php_version }}-intl --- roles/moodle/tasks/install.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/moodle/tasks/install.yml b/roles/moodle/tasks/install.yml index f28594d10..558519af2 100644 --- a/roles/moodle/tasks/install.yml +++ b/roles/moodle/tasks/install.yml @@ -26,7 +26,7 @@ # state: present # when: not is_debuntu -- name: Install 4 php packages (debuntu) +- name: Install 7 php packages (debuntu) package: name: - php{{ php_version }}-pgsql @@ -34,7 +34,8 @@ - php{{ php_version }}-zip - php{{ php_version }}-gd - php{{ php_version }}-mbstring # 2020-06-15: Now required by Moodle 3.9+ - - php{{ php_version }}-cli # 2020-06-15: In the past this included (above) mbstring? However this is not true on Ubuntu Server 20.04 LTS. + - php{{ php_version }}-cli # 2020-06-15: In the past this included (above) mbstring? However this is not true on Ubuntu Server 20.04 LTS. + - php{{ php_version }}-intl # 2020-12-03: Now required by Moodle 3.10+ state: present when: is_debuntu From 7f89cb8fd41a108c84ed590c53f2f63e29646cab Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 3 Dec 2020 20:57:00 -0500 Subject: [PATCH 14/95] Moodle 3.10 recommends pkg php{{ php_version }}-soap --- roles/moodle/tasks/install.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/roles/moodle/tasks/install.yml b/roles/moodle/tasks/install.yml index 558519af2..2f9495179 100644 --- a/roles/moodle/tasks/install.yml +++ b/roles/moodle/tasks/install.yml @@ -26,16 +26,17 @@ # state: present # when: not is_debuntu -- name: Install 7 php packages (debuntu) +- name: Install 8 php packages (debuntu) package: name: - php{{ php_version }}-pgsql - php{{ php_version }}-curl - php{{ php_version }}-zip - php{{ php_version }}-gd - - php{{ php_version }}-mbstring # 2020-06-15: Now required by Moodle 3.9+ + - php{{ php_version }}-mbstring # 2020-06-15: Required by Moodle 3.9+ - php{{ php_version }}-cli # 2020-06-15: In the past this included (above) mbstring? However this is not true on Ubuntu Server 20.04 LTS. - - php{{ php_version }}-intl # 2020-12-03: Now required by Moodle 3.10+ + - php{{ php_version }}-intl # 2020-12-03: Required by Moodle 3.10+ + - php{{ php_version }}-soap # 2020-12-03: Recommended by Moodle 3.10+ state: present when: is_debuntu From 321075350f544d9323551969113e16ca1bbcc0f6 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 9 Dec 2020 12:17:51 -0500 Subject: [PATCH 15/95] iiab-diagnostics: handle filenames that contain spaces --- scripts/iiab-diagnostics | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/scripts/iiab-diagnostics b/scripts/iiab-diagnostics index 2354ae9c0..73fa869ee 100755 --- a/scripts/iiab-diagnostics +++ b/scripts/iiab-diagnostics @@ -31,28 +31,28 @@ outfile=/etc/iiab/diag/${IIAB_RELEASE}_${OS_VER}_${YMDT}_$nickname # roles/0-init/tasks/main.yml. A bit like system logs, but only on request. function cat_file_raw() { # $1 = path/filename; $2 = # of lines, for tail - if [ -f $1 ]; then - ls -l $1 >> $outfile - if [ ! -s $1 ]; then + if [ -f "$1" ]; then + ls -l "$1" >> $outfile + if [ ! -s "$1" ]; then echo >> $outfile echo "FILE EXISTS BUT IS EMPTY!" >> $outfile elif [ $# -eq 1 ]; then echo >> $outfile # Redact most passwords from /etc/iiab/local_vars.yml, /etc/hostapd/hostapd.conf, /etc/wpa_supplicant/wpa_supplicant.conf, /etc/netplan/*, /etc/network/interfaces, /etc/network/interfaces.d/* ETC -- not much to worry about in /etc/iiab/iiab.ini (' = ') - cat $1 | sed 's/^\(\s*[[:alnum:]_-]*\(psk\|passphrase\|password\):\).*/\1 [REDACTED]/; s/^\(\s*[[:alnum:]_-]*\(psk\|passphrase\|password\)[= \t]\).*/\1[REDACTED]/' | iconv -t UTF-8//IGNORE >> $outfile + cat "$1" | sed 's/^\(\s*[[:alnum:]_-]*\(psk\|passphrase\|password\):\).*/\1 [REDACTED]/; s/^\(\s*[[:alnum:]_-]*\(psk\|passphrase\|password\)[= \t]\).*/\1[REDACTED]/' | iconv -t UTF-8//IGNORE >> $outfile else # e.g. last 100 lines, maximum echo " ...ITS LAST $2 LINES FOLLOW..." >> $outfile echo >> $outfile - tail -$2 $1 | sed 's/^\(\s*[[:alnum:]_-]*\(psk\|passphrase\|password\):\).*/\1 [REDACTED]/; s/^\(\s*[[:alnum:]_-]*\(psk\|passphrase\|password\)[= \t]\).*/\1[REDACTED]/' | iconv -t UTF-8//IGNORE >> $outfile + tail -$2 "$1" | sed 's/^\(\s*[[:alnum:]_-]*\(psk\|passphrase\|password\):\).*/\1 [REDACTED]/; s/^\(\s*[[:alnum:]_-]*\(psk\|passphrase\|password\)[= \t]\).*/\1[REDACTED]/' | iconv -t UTF-8//IGNORE >> $outfile fi echo >> $outfile - elif [ -h $1 ]; then - ls -l $1 >> $outfile + elif [ -h "$1" ]; then + ls -l "$1" >> $outfile echo >> $outfile echo "SYMLINK DOES NOT LEAD TO A REGULAR FILE!" >> $outfile echo >> $outfile - elif [ -d $1 ]; then - ls -ld $1 >> $outfile + elif [ -d "$1" ]; then + ls -ld "$1" >> $outfile echo >> $outfile echo "THIS IS A DIRECTORY NOT A FILE!" >> $outfile echo >> $outfile @@ -64,7 +64,7 @@ function cat_file_raw() { # $1 = path/filename; $2 = # of lines, for tail function cat_file() { echo " $1" echo "=IIAB==========================================================================" >> $outfile - cat_file_raw $1 + cat_file_raw "$1" } function cat_dir() { @@ -72,9 +72,10 @@ function cat_dir() { echo "=IIAB==========================================================================" >> $outfile if [ -d "$1" ]; then echo "DIRECTORY $1 FILES WILL FOLLOW...IF THEY EXIST" >> $outfile - for f in $(ls $1); do + shopt -s nullglob # To avoid looping over empty directories + for f in "$1"/*; do echo "-IIAB--------------------------------------------------------------------------" >> $outfile - cat_file_raw $1/$f 100 + cat_file_raw "$f" 100 done else echo "DIRECTORY DOES NOT EXIST: $1" >> $outfile @@ -84,7 +85,7 @@ function cat_dir() { function cat_cmd() { # $1 = command + params, $2 = explanation echo " $1 # $2" echo "=IIAB==========================================================================" >> $outfile - cmd=$(echo $1 | sed 's/\s.*$//') # Keep command on left; Drop params on right + cmd=$(echo "$1" | sed 's/\s.*$//') # Keep command on left; Drop params on right pth=$(which $cmd | sed 's/[^/]*$//') # Keep only path on left; Drop command on right echo "COMMAND: $pth$1 # $2" >> $outfile echo >> $outfile @@ -99,7 +100,7 @@ function cat_cmd() { # $1 = command + params, $2 = explan function cat_tail() { # $1 = path/filename; $2 = # of lines, for tail echo " $1" echo "=IIAB==========================================================================" >> $outfile - cat_file_raw $1 $2 # e.g. last 100 lines, maximum + cat_file_raw "$1" $2 # e.g. last 100 lines, maximum } # START BUILDING UP THE FILE THAT'LL CONTAIN THE DIAGNOSTICS! From 112a68802caef55998b3f6791d66c0fb5cb81caf Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 9 Dec 2020 12:32:20 -0500 Subject: [PATCH 16/95] iiab-dagnostics: untabify indentation --- scripts/iiab-diagnostics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/iiab-diagnostics b/scripts/iiab-diagnostics index 73fa869ee..edbc78985 100755 --- a/scripts/iiab-diagnostics +++ b/scripts/iiab-diagnostics @@ -72,7 +72,7 @@ function cat_dir() { echo "=IIAB==========================================================================" >> $outfile if [ -d "$1" ]; then echo "DIRECTORY $1 FILES WILL FOLLOW...IF THEY EXIST" >> $outfile - shopt -s nullglob # To avoid looping over empty directories + shopt -s nullglob # To avoid looping over empty directories for f in "$1"/*; do echo "-IIAB--------------------------------------------------------------------------" >> $outfile cat_file_raw "$f" 100 From dd831aa946233dcfc63c5e5214f235610e8145ca Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 9 Dec 2020 12:35:26 -0500 Subject: [PATCH 17/95] iiab-dagnostics: untabify indentation --- scripts/iiab-diagnostics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/iiab-diagnostics b/scripts/iiab-diagnostics index edbc78985..b64423262 100755 --- a/scripts/iiab-diagnostics +++ b/scripts/iiab-diagnostics @@ -43,7 +43,7 @@ function cat_file_raw() { # $1 = path/filename; $2 = # of lines, for tail else # e.g. last 100 lines, maximum echo " ...ITS LAST $2 LINES FOLLOW..." >> $outfile echo >> $outfile - tail -$2 "$1" | sed 's/^\(\s*[[:alnum:]_-]*\(psk\|passphrase\|password\):\).*/\1 [REDACTED]/; s/^\(\s*[[:alnum:]_-]*\(psk\|passphrase\|password\)[= \t]\).*/\1[REDACTED]/' | iconv -t UTF-8//IGNORE >> $outfile + tail -$2 "$1" | sed 's/^\(\s*[[:alnum:]_-]*\(psk\|passphrase\|password\):\).*/\1 [REDACTED]/; s/^\(\s*[[:alnum:]_-]*\(psk\|passphrase\|password\)[= \t]\).*/\1[REDACTED]/' | iconv -t UTF-8//IGNORE >> $outfile fi echo >> $outfile elif [ -h "$1" ]; then From 45dbfaaa2bf5a5cb3068f813263dfae8ededf971 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 9 Dec 2020 22:06:19 -0500 Subject: [PATCH 18/95] Update iiab-diagnostics.README.md --- scripts/iiab-diagnostics.README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/iiab-diagnostics.README.md b/scripts/iiab-diagnostics.README.md index 3bf5cfdb2..00ae4ddc7 100644 --- a/scripts/iiab-diagnostics.README.md +++ b/scripts/iiab-diagnostics.README.md @@ -62,4 +62,4 @@ But first off, the file is compiled by harvesting 1 + 6 kinds of things: ## Source Code -Please look over the bottom of [iiab-diagnostics](iiab-diagnostics) (lines 105-221 especially) to learn more about which common IIAB files and commands make this rapid troubleshooting possible. +Please look over the bottom of [iiab-diagnostics](iiab-diagnostics) (lines 106-222 especially) to learn more about which common IIAB files and commands make this rapid troubleshooting possible. From e18a89975e6e0da07f951ab36a5fe856d01c4a6d Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 15 Dec 2020 05:59:45 -0500 Subject: [PATCH 19/95] Recommend Ansible (ansible-base) 2.10.4 --- scripts/ansible | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ansible b/scripts/ansible index bfd02e073..3bdc9ab9a 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -5,7 +5,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.10.3" # Orig for 'yum install [rpm]' & XO laptops (pip install) +GOOD_VER="2.10.4" # Orig for 'yum install [rpm]' & XO laptops (pip install) # We install latest 'ansible-base' from PPA: (may be more recent than GOOD-VER) # https://launchpad.net/~ansible/+archive/ubuntu/ansible # https://launchpad.net/~ansible/+archive/ubuntu/ansible-2.10 From 6ecad1da0538351bdfa78780b2e9e39cfb5a2956 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 15 Dec 2020 06:25:41 -0500 Subject: [PATCH 20/95] Mentions Ansible 2.9.16 as possible alternative --- scripts/ansible | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index 86eea0c4d..33d725383 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -15,8 +15,8 @@ GOOD_VER="2.10.4" # Orig for 'yum install [rpm]' & XO laptops (pip install) # IIAB implementers might instead consider these 2 GENERAL TECHNIQUES below # ("in an emergency!") e.g. if you must install an older version of Ansible: -# TEMPORARILY USE ANSIBLE 2.9.15 (REMOVE IT WITH "pip uninstall ansible") -#pip install ansible==2.9.15 +# TEMPORARILY USE ANSIBLE 2.9.16 (REMOVE IT WITH "pip uninstall ansible") +#pip install ansible==2.9.16 # 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 f8e11fa90e3c332c05cf09bb60a988842c25ae4e Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 17 Dec 2020 13:12:04 -0500 Subject: [PATCH 21/95] MediaWiki 1.35.0 -> 1.35.1 LTS --- roles/mediawiki/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mediawiki/defaults/main.yml b/roles/mediawiki/defaults/main.yml index 6f9827e61..75954c71d 100644 --- a/roles/mediawiki/defaults/main.yml +++ b/roles/mediawiki/defaults/main.yml @@ -5,7 +5,7 @@ # If nec, change them by editing /etc/iiab/local_vars.yml prior to installing! mediawiki_major_version: 1.35 # "1.35" also works -mediawiki_minor_version: 0 +mediawiki_minor_version: 1 mediawiki_version: "{{ mediawiki_major_version }}.{{ mediawiki_minor_version }}" mediawiki_download_base_url: "https://releases.wikimedia.org/mediawiki/{{ mediawiki_major_version }}" From 816b33a5104b2fdab7d797c6a5fdb13d99af5473 Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 18 Dec 2020 07:18:41 -0500 Subject: [PATCH 22/95] Egg 2.3.15 -> 2.3.16 --- roles/elgg/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/elgg/defaults/main.yml b/roles/elgg/defaults/main.yml index f19bf3e29..66404ba00 100644 --- a/roles/elgg/defaults/main.yml +++ b/roles/elgg/defaults/main.yml @@ -8,7 +8,7 @@ # If nec, change them by editing /etc/iiab/local_vars.yml prior to installing! elgg_xx: elgg -elgg_version: 2.3.15 +elgg_version: 2.3.16 # elgg_mysql_password: defined in default_vars elgg_url: /elgg From 93a0ab53f9d4a8f841a461da090e920428aa6e57 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 26 Dec 2020 12:57:25 -0500 Subject: [PATCH 23/95] Calibre-Web 0.6.9 -> 0.6.10 QA --- roles/calibre-web/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/calibre-web/defaults/main.yml b/roles/calibre-web/defaults/main.yml index a57ecfcc7..903b3b6e5 100644 --- a/roles/calibre-web/defaults/main.yml +++ b/roles/calibre-web/defaults/main.yml @@ -14,7 +14,7 @@ # All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml # If nec, change them by editing /etc/iiab/local_vars.yml prior to installing! -calibreweb_version: 0.6.9 # WAS: master, 0.6.4, 0.6.5, 0.6.6, 0.6.7, 0.6.8 +calibreweb_version: master # WAS: master, 0.6.4, 0.6.5, 0.6.6, 0.6.7, 0.6.8, 0.6.9 calibreweb_venv_path: /usr/local/calibre-web-py3 calibreweb_exec_path: "{{ calibreweb_venv_path }}/cps.py" From 4318387ad1ee65e9ea4f0f2a83f06c86abfe9b65 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 28 Dec 2020 14:00:16 -0500 Subject: [PATCH 24/95] Gitea 1.13.0 -> 1.13.1 --- 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 126020cc2..8157e7077 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.13.0 +gitea_version: 1.13.1 iset_suffixes: i386: 386 x86_64: amd64 From b93a69ce9899a6df15706dc08c203809098ae9ba Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 28 Dec 2020 19:22:25 -0500 Subject: [PATCH 25/95] Broken link in roles/network/README.rst --- roles/network/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/network/README.rst b/roles/network/README.rst index 7c8225078..89b446b89 100644 --- a/roles/network/README.rst +++ b/roles/network/README.rst @@ -12,7 +12,7 @@ Specifically, this 'network' role is run... Many IIAB networking questions can be answered in these 2 documents: -- `IIAB Networking `_ is a high-level summary, that reviews IIAB's 3 modes of operation distinguishing WAN from LAN, `common ports `_, DNS name resolution and some common customizations. +- `IIAB Networking `_ is a high-level summary, that reviews IIAB's 3 modes of operation distinguishing WAN from LAN, `common ports `_, DNS name resolution and some common customizations. - http://FAQ.IIAB.IO includes answers to common questions like: - What is local_vars.yml and how do I customize it? From f46d469eb7055176b94d8149d1798a28f40d78b2 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 18 Jan 2021 19:48:49 -0500 Subject: [PATCH 26/95] ansible-base 2.10.5 --- scripts/ansible | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index 33d725383..70fe819a0 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -5,7 +5,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.10.4" # Orig for 'yum install [rpm]' & XO laptops (pip install) +GOOD_VER="2.10.5" # Orig for 'yum install [rpm]' & XO laptops (pip install) # We install latest 'ansible-base' from PPA: (may be more recent than GOOD-VER) # https://launchpad.net/~ansible/+archive/ubuntu/ansible # https://launchpad.net/~ansible/+archive/ubuntu/ansible-2.10 @@ -15,8 +15,8 @@ GOOD_VER="2.10.4" # Orig for 'yum install [rpm]' & XO laptops (pip install) # IIAB implementers might instead consider these 2 GENERAL TECHNIQUES below # ("in an emergency!") e.g. if you must install an older version of Ansible: -# TEMPORARILY USE ANSIBLE 2.9.16 (REMOVE IT WITH "pip uninstall ansible") -#pip install ansible==2.9.16 +# TEMPORARILY USE ANSIBLE 2.9.17 (REMOVE IT WITH "pip uninstall ansible") +#pip install ansible==2.9.17 # 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 74acc0774a3bbb67a05ab71ca411220296d1b239 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 28 Jan 2021 18:35:15 -0500 Subject: [PATCH 27/95] Comment out non-existent {{ ansible_product_uuid }} --- roles/0-init/tasks/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/0-init/tasks/main.yml b/roles/0-init/tasks/main.yml index 1ac502f7b..ba11b05cb 100644 --- a/roles/0-init/tasks/main.yml +++ b/roles/0-init/tasks/main.yml @@ -137,8 +137,9 @@ value: "{{ ansible_memtotal_mb }}" - option: swap_mb value: "{{ ansible_swaptotal_mb }}" - - option: product_id - value: "{{ ansible_product_uuid }}" + # 2021-01-28: Non-existent, so fails with Ansible 2.10.5 (#2669) + #- option: product_id + # value: "{{ ansible_product_uuid }}" - option: gw_active value: "{{ gw_active }}" - option: internet_available From 3cdcddccfb1d59d1761687b6e7fe30d0938a9399 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 28 Jan 2021 18:38:06 -0500 Subject: [PATCH 28/95] Non-existent var explanation --- roles/0-init/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/0-init/tasks/main.yml b/roles/0-init/tasks/main.yml index ba11b05cb..53864bb7f 100644 --- a/roles/0-init/tasks/main.yml +++ b/roles/0-init/tasks/main.yml @@ -137,7 +137,7 @@ value: "{{ ansible_memtotal_mb }}" - option: swap_mb value: "{{ ansible_swaptotal_mb }}" - # 2021-01-28: Non-existent, so fails with Ansible 2.10.5 (#2669) + # 2021-01-28: Non-existent var, so fails with Ansible 2.10.5 (#2669) #- option: product_id # value: "{{ ansible_product_uuid }}" - option: gw_active From 29954c8ba5de9d0eea20ada7c8ed75d80525d3fd Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 28 Jan 2021 18:51:58 -0500 Subject: [PATCH 29/95] Clarify ansible-base 2.10.5 --- roles/0-init/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/0-init/tasks/main.yml b/roles/0-init/tasks/main.yml index 53864bb7f..0a212c215 100644 --- a/roles/0-init/tasks/main.yml +++ b/roles/0-init/tasks/main.yml @@ -137,7 +137,7 @@ value: "{{ ansible_memtotal_mb }}" - option: swap_mb value: "{{ ansible_swaptotal_mb }}" - # 2021-01-28: Non-existent var, so fails with Ansible 2.10.5 (#2669) + # 2021-01-28: Non-existent var, so fails with ansible-base 2.10.5 (#2669) #- option: product_id # value: "{{ ansible_product_uuid }}" - option: gw_active From e144f9821be3cd16bdbeb1eda7a5f80b19975b21 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 28 Jan 2021 20:24:10 -0500 Subject: [PATCH 30/95] Install 4th Ansible collection: community.postgresql --- collections.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/collections.yml b/collections.yml index 77c100ee3..f65d3a552 100644 --- a/collections.yml +++ b/collections.yml @@ -6,6 +6,7 @@ collections: - name: community.general - name: community.mysql + - name: community.postgresql - name: ansible.posix # 2020-11-28: For ~3 modules below... # selinux WAS in /opt/iiab/iiab/roles/1-prep/tasks/main.yml From 45866f2eb9b6287de531ce416fb3d2a6ded8ed06 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 28 Jan 2021 20:26:11 -0500 Subject: [PATCH 31/95] ~4 instead of ~3 Andible collections going forward --- scripts/ansible | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ansible b/scripts/ansible index 33d725383..9def2cf42 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -94,7 +94,7 @@ $APT_PATH/apt -y --allow-downgrades install ansible-base \ # (Re)running collection installs appears safe, with --force-with-deps to force # upgrade of collection and dependencies it pulls in. Note Ansible may support # upgrading all collections cleanly in future. See PRs #2647 #2652 #2653 #2655 -echo -e "\n\nIIAB requires these ~3 Ansible Collections: (we upgrade them here if possible!)\n" +echo -e "\n\nIIAB requires these ~4 Ansible Collections: (we upgrade them here if possible!)\n" ansible-galaxy collection install --force-with-deps \ -r /opt/iiab/iiab/collections.yml \ -p /usr/share/ansible/collections From 6c41b074627833fa322252be8fb09fc17b7d6c02 Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 29 Jan 2021 11:48:00 -0500 Subject: [PATCH 32/95] Initialize vars in network/defaults/main.yml e.g. 'prior_gw_device: unset' --- roles/network/defaults/main.yml | 38 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/roles/network/defaults/main.yml b/roles/network/defaults/main.yml index 186eb08c5..247a2f1f1 100644 --- a/roles/network/defaults/main.yml +++ b/roles/network/defaults/main.yml @@ -17,7 +17,7 @@ # Wi-Fi - IF NECESSARY, CUSTOMIZE THESE 6 VARIABLES IN /etc/iiab/local_vars.yml # host_country_code: US -# host_ssid: "Internet in a Box" +# host_ssid: Internet in a Box # host_wifi_mode: g # host_channel: 6 # hostapd_secure: False @@ -53,28 +53,28 @@ wireless_lan_present: False strict_networking: False iiab_demo_mode: False gui_static_wan: False -wan_cidr: +wan_cidr: "" virtual_network_devices: "-e ap0 -e lo -e br0 -e tun -e br- -e docker -e bridge0 -e veth" # Set defaults for discovery process as strings wifi1: "not found-1" wifi2: "not found-2" -exclude_devices: "none" -device_gw: "none" -prior_gw_device: "" +exclude_devices: none +device_gw: none +prior_gw_device: unset -iiab_wan_iface: "none" -iiab_lan_iface: "none" -discovered_lan_iface: "none" -discovered_wired_iface: "none" -discovered_wireless_iface: "none" +iiab_wan_iface: none +iiab_lan_iface: none +discovered_lan_iface: none +discovered_wired_iface: none +discovered_wireless_iface: none # Red Hat #iiab_wired_lan_iface: "none" #iiab_wireless_lan_iface: "none" has_WAN: False -has_ifcfg_gw: "none" -has_wifi_gw: "none" +has_ifcfg_gw: none +has_wifi_gw: none # Debian dhcpcd_result: "" @@ -83,10 +83,10 @@ network_manager_active: False systemd_networkd_active: False # The values here are default local variables -gui_wan_iface: "unset" -gui_static_wan_ip: "unset" -wondershaper_dspeed: "4096" -wondershaper_upspeed: "1024" +gui_wan_iface: unset +gui_static_wan_ip: unset +wondershaper_dspeed: 4096 +wondershaper_upspeed: 1024 # netplan fix_dispatcher: True @@ -105,7 +105,7 @@ fix_dispatcher: True # Above 2 vars set in /etc/iiab/local_vars.yml # captive_portal_port: "9090" # Above var set in /opt/iiab/iiab/vars/default_vars.yml -py_captive_portal_port: "9090" -py_captive_portal_username: "Admin" -py_captive_portal_password: "changeme" +py_captive_portal_port: 9090 +py_captive_portal_username: Admin +py_captive_portal_password: changeme # In a pinch, disable it by running: systemctl disable captive-portal From a53b0752b4865a2cb0dea607224d8fc30c4155ac Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 29 Jan 2021 16:03:36 -0500 Subject: [PATCH 33/95] Ansible boolean/var types doc in validate_vars.yml --- roles/0-init/tasks/validate_vars.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/0-init/tasks/validate_vars.yml b/roles/0-init/tasks/validate_vars.yml index 5c79cc537..bded743e7 100644 --- a/roles/0-init/tasks/validate_vars.yml +++ b/roles/0-init/tasks/validate_vars.yml @@ -36,6 +36,11 @@ # 2020-07-08 - Excellent analysis & summary by Jon Spriggs: "In Ansible, # determine the type of a value, and casting those values to other types" # https://jon.sprig.gs/blog/post/1801 +# +# 2021-01-29 - ansible-base 2.10.5 (1) is more strict about empty string vars +# (2) no longer supports "when: myvar is boolean", "is integer" & "is float" +# (3) brings yet more "Ansible collection" dependency changes (undocumented!) +# Details: https://github.com/iiab/iiab/pull/2672 (see also #2669) # 3. "How do i fail a task in Ansible if the variable contains a boolean value? # I want to perform input validation for Ansible playbooks" From e4a0fab889bfc6100e15a69fd8fa83a7e54ccdc2 Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 29 Jan 2021 16:33:04 -0500 Subject: [PATCH 34/95] Mention "Ansible Collections" dep changes --- roles/0-init/tasks/validate_vars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/0-init/tasks/validate_vars.yml b/roles/0-init/tasks/validate_vars.yml index bded743e7..25b0fda19 100644 --- a/roles/0-init/tasks/validate_vars.yml +++ b/roles/0-init/tasks/validate_vars.yml @@ -39,7 +39,7 @@ # # 2021-01-29 - ansible-base 2.10.5 (1) is more strict about empty string vars # (2) no longer supports "when: myvar is boolean", "is integer" & "is float" -# (3) brings yet more "Ansible collection" dependency changes (undocumented!) +# (3) brings yet more "Ansible Collections" dependency changes (undocumented!) # Details: https://github.com/iiab/iiab/pull/2672 (see also #2669) # 3. "How do i fail a task in Ansible if the variable contains a boolean value? From c3aa051770a9b5367f5c2c64eb3acc67c35fb078 Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 29 Jan 2021 18:47:20 -0500 Subject: [PATCH 35/95] Rename calibre-install-packages.sh.unusued to calibre-install-packages.sh.unused --- ...all-packages.sh.unusued => calibre-install-packages.sh.unused} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename scripts/{calibre-install-packages.sh.unusued => calibre-install-packages.sh.unused} (100%) diff --git a/scripts/calibre-install-packages.sh.unusued b/scripts/calibre-install-packages.sh.unused similarity index 100% rename from scripts/calibre-install-packages.sh.unusued rename to scripts/calibre-install-packages.sh.unused From 0e7169cf1ff627aea1c568dd85a1e7b2cd07f3f0 Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 29 Jan 2021 19:03:28 -0500 Subject: [PATCH 36/95] Update local_facts.fact --- 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 311a00136..2a6458a35 100755 --- a/scripts/local_facts.fact +++ b/scripts/local_facts.fact @@ -92,9 +92,9 @@ tmp=$(ansible --version) && ANSIBLE_VERSION=$(echo "$tmp" | head -n 1 | cut -f 2 -d " ") -# THESE LAST 3 ARE DIFFEENT as "systemctl is-enabled" unhelpfully returns the -# same rerror code (i.e. 1) REGARDLESS whether service is (A) disabled or -# (B) doesn't exist. SO WE TEST THE STRING OUTPUT INSTEAD OF THE RETURN CODE. +# THE LAST 3 BELOW ARE DIFFERENT as "systemctl is-enabled" unhelpfully returns +# the same error code (i.e. 1) REGARDLESS whether the service is (A) disabled +# or (B) doesn't exist. SO WE TEST THE STRING OUTPUT INSTEAD OF THE RETURN CODE tmp=$(systemctl is-enabled dhcpcd) [[ $tmp != "" ]] && From b8311af03ab2d5e51f7c4f1a0af1ef0c89aa0cfb Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 29 Jan 2021 20:56:24 -0500 Subject: [PATCH 37/95] Fix comment in network/defaults/main.yml --- roles/network/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/network/defaults/main.yml b/roles/network/defaults/main.yml index 247a2f1f1..93e416cad 100644 --- a/roles/network/defaults/main.yml +++ b/roles/network/defaults/main.yml @@ -103,7 +103,7 @@ fix_dispatcher: True # captive_portal_install: False # captive_portal_enabled: False # Above 2 vars set in /etc/iiab/local_vars.yml -# captive_portal_port: "9090" +# captive_portal_port: 9090 # Above var set in /opt/iiab/iiab/vars/default_vars.yml py_captive_portal_port: 9090 py_captive_portal_username: Admin From fcc7f73796facb1859639af8002de1b06e321b46 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 1 Feb 2021 11:12:21 -0500 Subject: [PATCH 38/95] Moodle code cleanup --- roles/moodle/defaults/main.yml | 3 +- roles/moodle/tasks/apache.yml | 4 +-- roles/moodle/tasks/install.yml | 50 ++++++++++------------------------ roles/moodle/tasks/main.yml | 16 ----------- 4 files changed, 18 insertions(+), 55 deletions(-) diff --git a/roles/moodle/defaults/main.yml b/roles/moodle/defaults/main.yml index 2bb7fe704..ab16dea1b 100644 --- a/roles/moodle/defaults/main.yml +++ b/roles/moodle/defaults/main.yml @@ -11,6 +11,5 @@ moodle_version: 310 moodle_repo_url: https://github.com/moodle/moodle.git #moodle_repo_url: git://git.moodle.org/moodle.git # 2020-10-16: VERY Slow! moodle_base: "{{ iiab_base }}/moodle" # /opt/iiab -#moodle_user: moodle -moodle_data: "{{ content_base }}/moodle" # /library/moodle +moodle_data: "{{ content_base }}/moodle" # /library moodle_database_name: moodle diff --git a/roles/moodle/tasks/apache.yml b/roles/moodle/tasks/apache.yml index b0a59d6df..b990f25a8 100644 --- a/roles/moodle/tasks/apache.yml +++ b/roles/moodle/tasks/apache.yml @@ -1,8 +1,8 @@ -- name: Enable http://box/moodle via Apache +- name: 'Enable http://box/moodle via Apache: create link /etc/apache2/sites-enabled/022-moodle.conf' command: a2ensite 022-moodle.conf when: moodle_enabled -- name: Disable http://box/moodle via Apache +- name: 'Disable http://box/moodle via Apache: remove link /etc/apache2/sites-enabled/022-moodle.conf' command: a2dissite 022-moodle.conf when: not moodle_enabled diff --git a/roles/moodle/tasks/install.yml b/roles/moodle/tasks/install.yml index 2f9495179..a5532dd64 100644 --- a/roles/moodle/tasks/install.yml +++ b/roles/moodle/tasks/install.yml @@ -18,14 +18,6 @@ name: postgresql -# - name: "Install packages: python-psycopg2, php-pgsql (OS's other than debuntu)" -# package: -# name: -# - python-psycopg2 -# - php-pgsql -# state: present -# when: not is_debuntu - - name: Install 8 php packages (debuntu) package: name: @@ -40,22 +32,12 @@ state: present when: is_debuntu -# - name: "Install package: php{{ php_version }}-zip (Ubuntu or Debian 9+)" -# package: -# name: "php{{ php_version }}-zip" -# when: is_ubuntu or (is_debian and not is_debian_8) - -# - name: "Install package: php-pclzip (debian-8)" -# package: -# name: php-pclzip -# when: is_debian_8 - - name: Does {{ moodle_base }}/config-dist.php exist? (indicating Moodle is/was installed) stat: - path: "{{ moodle_base }}/config-dist.php" + path: "{{ moodle_base }}/config-dist.php" # /opt/iiab/moodle register: moodle -- name: Clone (i.e. use git to download) {{ moodle_repo_url }} to {{ moodle_base }} +- name: Clone (i.e. use git to download) {{ moodle_repo_url }} to {{ moodle_base }} (~300 MB) git: repo: "{{ moodle_repo_url }}" dest: "{{ moodle_base }}" @@ -78,29 +60,27 @@ state: directory path: "{{ content_base }}/dbdata/moodle" owner: "{{ apache_user }}" - # mode: '0755' -- name: Create dir {{ moodle_data }} ({{ apache_user }}:{{ apache_user }}, '0770') # /library/moodle +- name: Create dir {{ moodle_data }} ({{ apache_user }}:{{ apache_user }}, '0770') file: state: directory - path: "{{ moodle_data }}" + path: "{{ moodle_data }}" # /library/moodle owner: "{{ apache_user }}" group: "{{ apache_user }}" - mode: '0770' + #mode: '0770' # Regardless, permissions end up as: drwxrwsrwx - name: Remove stock /etc/{{ apache_conf_dir }}/moodle.conf file: - path: "/etc/{{ apache_conf_dir }}/moodle.conf" + path: "/etc/{{ apache_conf_dir }}/moodle.conf" # apache2/sites-available state: absent - name: Install /etc/{{ apache_conf_dir }}/022-moodle.conf from template template: src: 022-moodle.j2 dest: "/etc/{{ apache_conf_dir }}/022-moodle.conf" - # owner: root - # group: root - # mode: '0644' +# roles/postgresql/templates/postgresql-iiab.service WAS INSTALLED HERE: +# /etc/systemd/system/postgresql-iiab.service - name: Start 'postgresql-iiab' systemd service, to configure Moodle's DB systemd: name: postgresql-iiab @@ -136,8 +116,7 @@ systemd: name: postgresql-iiab state: restarted - #enabled: yes - #when: moodle_enabled + #enabled: yes # Service ends up enabled regardless - name: (Re)Start '{{ apache_service }}' systemd service systemd: @@ -153,11 +132,12 @@ shell: "{{ moodle_base }}/moodle_installer" when: config.stat.exists is defined and not config.stat.exists -- name: Make {{ moodle_base }}/config.php readable, with permission '0644' - #command: chown -R {{ apache_user }} {{ moodle_base }} - file: - path: "{{ moodle_base }}/config.php" # /opt/iiab/moodle - mode: '0644' +# 2021-02-01: Let's stick with Moodle's default (640) +#- name: Make {{ moodle_base }}/config.php readable, with permission '0644' +# #command: chown -R {{ apache_user }} {{ moodle_base }} +# file: +# path: "{{ moodle_base }}/config.php" # /opt/iiab/moodle +# mode: '0644' # RECORD Moodle AS INSTALLED diff --git a/roles/moodle/tasks/main.yml b/roles/moodle/tasks/main.yml index 3189b590c..9adc1d300 100644 --- a/roles/moodle/tasks/main.yml +++ b/roles/moodle/tasks/main.yml @@ -24,22 +24,6 @@ when: moodle_installed is undefined -# - name: Enable 'postgresql-iiab' systemd service, if moodle_enabled -# systemd: -# name: postgresql-iiab -# deamon_reload: yes -# state: started -# enabled: yes -# when: moodle_enabled -# -# # if the only service using the backend db disable if not running -# - name: Disable 'postgresql-iiab' systemd service, if 'not moodle_enabled and not (pathagar_enabled is defined and pathagar_enabled)' -# systemd: -# name: postgresql-iiab -# state: stopped -# enabled: no -# when: not moodle_enabled and not (pathagar_enabled is defined and pathagar_enabled) - - name: "Set 'postgresql_install: True' and 'postgresql_enabled: True' if moodle_enabled" set_fact: postgresql_install: True From 1d11e3905cab273244f5caf241c3aedbcd33862b Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 1 Feb 2021 11:31:57 -0500 Subject: [PATCH 39/95] Clarify moodle/tasks/install.yml --- roles/moodle/tasks/install.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/moodle/tasks/install.yml b/roles/moodle/tasks/install.yml index a5532dd64..f15289ce1 100644 --- a/roles/moodle/tasks/install.yml +++ b/roles/moodle/tasks/install.yml @@ -52,13 +52,13 @@ file: state: directory path: "{{ moodle_base }}" - owner: "{{ apache_user }}" + owner: "{{ apache_user }}" # www-data recurse: yes - name: Create dir {{ content_base }}/dbdata/moodle owned by {{ apache_user }} file: state: directory - path: "{{ content_base }}/dbdata/moodle" + path: "{{ content_base }}/dbdata/moodle" # /library owner: "{{ apache_user }}" - name: Create dir {{ moodle_data }} ({{ apache_user }}:{{ apache_user }}, '0770') @@ -74,6 +74,7 @@ path: "/etc/{{ apache_conf_dir }}/moodle.conf" # apache2/sites-available state: absent +# 2021-02-01: Not nec if we can hopefully migrate from Apache to NGINX soon! - name: Install /etc/{{ apache_conf_dir }}/022-moodle.conf from template template: src: 022-moodle.j2 From cd364b922812420b9cb2660705199e2d77930377 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Mon, 1 Feb 2021 14:46:05 -0600 Subject: [PATCH 40/95] moodle - split postgresql_install postgresql_enabled conditional --- roles/moodle/tasks/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/moodle/tasks/main.yml b/roles/moodle/tasks/main.yml index 9adc1d300..b0ac4028b 100644 --- a/roles/moodle/tasks/main.yml +++ b/roles/moodle/tasks/main.yml @@ -24,9 +24,12 @@ when: moodle_installed is undefined -- name: "Set 'postgresql_install: True' and 'postgresql_enabled: True' if moodle_enabled" +- name: "Set 'postgresql_install: True'" set_fact: postgresql_install: True + +- name: "Set 'postgresql_enabled: True' if moodle_enabled" + set_fact: postgresql_enabled: True when: moodle_enabled From d4985ae10b6ba885c14dd7ef36073c390489f8ea Mon Sep 17 00:00:00 2001 From: root Date: Mon, 1 Feb 2021 17:12:06 -0500 Subject: [PATCH 41/95] Tighten up moodle/tasks/main.yml --- roles/moodle/tasks/main.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/roles/moodle/tasks/main.yml b/roles/moodle/tasks/main.yml index b0ac4028b..701dc3210 100644 --- a/roles/moodle/tasks/main.yml +++ b/roles/moodle/tasks/main.yml @@ -24,14 +24,10 @@ when: moodle_installed is undefined -- name: "Set 'postgresql_install: True'" +- name: "Set 'postgresql_install: True' and 'postgresql_enabled: True'" set_fact: postgresql_install: True - -- name: "Set 'postgresql_enabled: True' if moodle_enabled" - set_fact: - postgresql_enabled: True - when: moodle_enabled + postgresql_enabled: True # Revert just below if... - name: "Set 'postgresql_enabled: False' if 'not moodle_enabled and not (pathagar_enabled is defined and pathagar_enabled)'" set_fact: @@ -43,14 +39,11 @@ name: postgresql -#- name: Enable/Disable/Restart Apache if primary - name: SHIM FOR NOW SO ALWAYS DO THE...Enable/Disable/Restart Apache include_tasks: apache.yml - #when: not nginx_enabled -- name: Enable/Disable/Restart NGINX if primary +- name: Enable/Disable/Restart NGINX include_tasks: nginx.yml - when: nginx_enabled - name: Add 'moodle' variable values to {{ iiab_ini_file }} @@ -64,7 +57,7 @@ value: Moodle - option: description value: '"Access the Moodle learning management system."' - - option: "moodle_base" + - option: moodle_base value: "{{ moodle_base }}" - option: moodle_enabled value: "{{ moodle_enabled }}" From b9abc3b6dcccd493226630d2716f2405d3d433cc Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 1 Feb 2021 18:54:47 -0500 Subject: [PATCH 42/95] Gitea 1.13.1 -> 1.13.2 --- 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 8157e7077..b127ae82c 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.13.1 +gitea_version: 1.13.2 iset_suffixes: i386: 386 x86_64: amd64 From 877fe724af499dc767f9bc875729666561299243 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 18 Feb 2021 14:07:56 -0500 Subject: [PATCH 43/95] iiab-diagnostics: redact commented passwords --- scripts/iiab-diagnostics | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/iiab-diagnostics b/scripts/iiab-diagnostics index b64423262..242fc8b60 100755 --- a/scripts/iiab-diagnostics +++ b/scripts/iiab-diagnostics @@ -39,11 +39,11 @@ function cat_file_raw() { # $1 = path/filename; $2 = # of lines, for tail elif [ $# -eq 1 ]; then echo >> $outfile # Redact most passwords from /etc/iiab/local_vars.yml, /etc/hostapd/hostapd.conf, /etc/wpa_supplicant/wpa_supplicant.conf, /etc/netplan/*, /etc/network/interfaces, /etc/network/interfaces.d/* ETC -- not much to worry about in /etc/iiab/iiab.ini (' = ') - cat "$1" | sed 's/^\(\s*[[:alnum:]_-]*\(psk\|passphrase\|password\):\).*/\1 [REDACTED]/; s/^\(\s*[[:alnum:]_-]*\(psk\|passphrase\|password\)[= \t]\).*/\1[REDACTED]/' | iconv -t UTF-8//IGNORE >> $outfile + cat "$1" | sed 's/^\(\s*[[:alnum:]#_-]*\(psk\|passphrase\|password\):\).*/\1 [REDACTED]/; s/^\(\s*[[:alnum:]#_-]*\(psk\|passphrase\|password\)[= \t]\).*/\1[REDACTED]/' | iconv -t UTF-8//IGNORE >> $outfile else # e.g. last 100 lines, maximum echo " ...ITS LAST $2 LINES FOLLOW..." >> $outfile echo >> $outfile - tail -$2 "$1" | sed 's/^\(\s*[[:alnum:]_-]*\(psk\|passphrase\|password\):\).*/\1 [REDACTED]/; s/^\(\s*[[:alnum:]_-]*\(psk\|passphrase\|password\)[= \t]\).*/\1[REDACTED]/' | iconv -t UTF-8//IGNORE >> $outfile + tail -$2 "$1" | sed 's/^\(\s*[[:alnum:]#_-]*\(psk\|passphrase\|password\):\).*/\1 [REDACTED]/; s/^\(\s*[[:alnum:]#_-]*\(psk\|passphrase\|password\)[= \t]\).*/\1[REDACTED]/' | iconv -t UTF-8//IGNORE >> $outfile fi echo >> $outfile elif [ -h "$1" ]; then From 62a4d44cd5226535e6f94ac9faddc9990321f360 Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 19 Feb 2021 14:34:44 -0500 Subject: [PATCH 44/95] Clarify large size of Nextcloud's latest.tar.bz2 --- roles/nextcloud/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/nextcloud/tasks/install.yml b/roles/nextcloud/tasks/install.yml index 665ede20c..939a2ed17 100644 --- a/roles/nextcloud/tasks/install.yml +++ b/roles/nextcloud/tasks/install.yml @@ -91,7 +91,7 @@ state: directory path: "{{ nextcloud_root_dir }}" # /library/www/nextcloud -- name: Unarchive {{ nextcloud_dl_url }} to {{ nextcloud_root_dir }} ({{ apache_user }}:{{ apache_user }}) +- name: Unarchive {{ nextcloud_dl_url }} (100+ MB) to {{ nextcloud_root_dir }} (400+ MB, {{ apache_user }}:{{ apache_user }}) unarchive: remote_src: yes src: "{{ nextcloud_dl_url }}" From aca6369eac08808004bdab1e2e87208e64ed3473 Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 19 Feb 2021 14:38:49 -0500 Subject: [PATCH 45/95] Clarify {{ apache_user }} is usually www-data --- roles/nextcloud/tasks/setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/nextcloud/tasks/setup.yml b/roles/nextcloud/tasks/setup.yml index 73b52e0cc..1f3e57f33 100644 --- a/roles/nextcloud/tasks/setup.yml +++ b/roles/nextcloud/tasks/setup.yml @@ -19,7 +19,7 @@ file: state: directory path: "{{ nextcloud_data_dir }}" # /library/www/nextcloud/data - owner: "{{ apache_user }}" + owner: "{{ apache_user }}" # www-data on debuntu group: "{{ apache_user }}" # 1 of 3: Very Old Way... from OwnCloud days From d80727fa3f3291bc83bed5e08ad520d7bd38f5fa Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 19 Feb 2021 14:39:39 -0500 Subject: [PATCH 46/95] Clarify {{ apache_user }} is usually www-data --- roles/nextcloud/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/nextcloud/tasks/install.yml b/roles/nextcloud/tasks/install.yml index 939a2ed17..7011999da 100644 --- a/roles/nextcloud/tasks/install.yml +++ b/roles/nextcloud/tasks/install.yml @@ -97,7 +97,7 @@ src: "{{ nextcloud_dl_url }}" #dest: "{{ nextcloud_base_dir }}" # /library/www dest: "{{ nextcloud_root_dir }}" # /library/www/nextcloud - owner: "{{ apache_user }}" # apache2 on debuntu + owner: "{{ apache_user }}" # www-data on debuntu group: "{{ apache_user }}" extra_opts: --strip-components=1 # Or use 'dest: /library/www' above when: internet_available From 3e16191050054d67c9985e84d08273e6acda7bff Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 19 Feb 2021 14:40:28 -0500 Subject: [PATCH 47/95] Clarify {{ apache_user }} is usually www-data --- roles/nextcloud/tasks/setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/nextcloud/tasks/setup.yml b/roles/nextcloud/tasks/setup.yml index 1f3e57f33..5619beabb 100644 --- a/roles/nextcloud/tasks/setup.yml +++ b/roles/nextcloud/tasks/setup.yml @@ -19,7 +19,7 @@ file: state: directory path: "{{ nextcloud_data_dir }}" # /library/www/nextcloud/data - owner: "{{ apache_user }}" # www-data on debuntu + owner: "{{ apache_user }}" # www-data on debuntu group: "{{ apache_user }}" # 1 of 3: Very Old Way... from OwnCloud days From d9bd70881fce6071db89e90530e289bc1594d64b Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 19 Feb 2021 14:58:24 -0500 Subject: [PATCH 48/95] Nextcloud 21 recommends php{{ php_version }}-bcmath --- roles/nextcloud/tasks/install.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/nextcloud/tasks/install.yml b/roles/nextcloud/tasks/install.yml index 665ede20c..d9d2c83e8 100644 --- a/roles/nextcloud/tasks/install.yml +++ b/roles/nextcloud/tasks/install.yml @@ -48,8 +48,9 @@ - ffmpeg # Optional (for preview generation) - libxml2 # php-libxml requires libxml2 >= 2.7.0 #- libapache2-mod-php # 2020-02-15: NO LONGER NEEDED? + - php{{ php_version }}-bcmath # Highly recommended by Nextcloud 21 for "improved performance and better compatibility" - php{{ php_version }}-bz2 # Optional (for extraction of apps) - - php{{ php_version }}-cli # Like optional? @jvonau says this drags in php{{ php_version }}-common as @m-anish wanted in PR #2119 / #2258 + - php{{ php_version }}-cli # Likely optional? @jvonau says this drags in php{{ php_version }}-common as @m-anish wanted in PR #2119 / #2258 - php{{ php_version }}-curl - php{{ php_version }}-gd - php{{ php_version }}-gmp # Optional (for SFTP storage) From 5117e692734999a6de1a7a92d1046cb5fe5e7ca3 Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 19 Feb 2021 15:18:27 -0500 Subject: [PATCH 49/95] Nextcloud now installs 12 -> 13 php packages --- roles/nextcloud/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/nextcloud/tasks/install.yml b/roles/nextcloud/tasks/install.yml index f7077e01b..0991a4b3e 100644 --- a/roles/nextcloud/tasks/install.yml +++ b/roles/nextcloud/tasks/install.yml @@ -41,7 +41,7 @@ # https://docs.nextcloud.com/server/18/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation -- name: Install ffmpeg + libxml2 + 12 php packages +- name: Install ffmpeg + libxml2 + 13 php packages package: name: #- dnsutils # NOT REQUESTED by Nextcloud From 7bb1628c83daa12993ad0a9d9faa2e1b32c7d6f7 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 21 Feb 2021 09:29:50 -0500 Subject: [PATCH 50/95] Recommend ansible-base 2.10.6 --- scripts/ansible | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ansible b/scripts/ansible index 8e718a862..b7060d5b6 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -5,7 +5,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.10.5" # Orig for 'yum install [rpm]' & XO laptops (pip install) +GOOD_VER="2.10.6" # Orig for 'yum install [rpm]' & XO laptops (pip install) # We install latest 'ansible-base' from PPA: (may be more recent than GOOD-VER) # https://launchpad.net/~ansible/+archive/ubuntu/ansible # https://launchpad.net/~ansible/+archive/ubuntu/ansible-2.10 From d3b49ec32df6c48bd0c96855004e9eaae0475a39 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Tue, 23 Feb 2021 18:55:47 -0500 Subject: [PATCH 51/95] kick ap0 --- roles/network/templates/hostapd/50-hostapd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/network/templates/hostapd/50-hostapd b/roles/network/templates/hostapd/50-hostapd index cf37bb8f9..37a363b72 100644 --- a/roles/network/templates/hostapd/50-hostapd +++ b/roles/network/templates/hostapd/50-hostapd @@ -1,6 +1,6 @@ if [ "$interface" = "br0" ] && [ $if_up = "true" ]; then - syslog info "50-iiab IF_UP br0 restarting dnsmasq" - sleep 2 + syslog info "50-iiab IF_UP br0 restarting dnsmasq - kicking ap0" + ip link set ap0 up systemctl --no-block restart dnsmasq fi From 01f3c0f0f07718ef3b24eef9b3a03e63f73f456b Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 07:35:35 -0500 Subject: [PATCH 52/95] phpMyAdmin 5.0.4 -> 5.1.0 --- roles/phpmyadmin/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/phpmyadmin/defaults/main.yml b/roles/phpmyadmin/defaults/main.yml index 359673189..c2c2eb450 100644 --- a/roles/phpmyadmin/defaults/main.yml +++ b/roles/phpmyadmin/defaults/main.yml @@ -4,7 +4,7 @@ # All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml # If nec, change them by editing /etc/iiab/local_vars.yml prior to installing! -phpmyadmin_version: 5.0.4 +phpmyadmin_version: 5.1.0 phpmyadmin_name: "phpMyAdmin-{{ phpmyadmin_version }}-all-languages" phpmyadmin_name_zip: "{{ phpmyadmin_name }}.zip" phpmyadmin_dl_url: "https://files.phpmyadmin.net/phpMyAdmin/{{ phpmyadmin_version }}/{{ phpmyadmin_name_zip }}" From 78c413777822baa0893942c97da7f65c70e9bde3 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 24 Feb 2021 09:02:46 -0500 Subject: [PATCH 53/95] Tighten up phpmyadmin role --- roles/nextcloud/tasks/install.yml | 2 +- roles/phpmyadmin/defaults/main.yml | 3 +- roles/phpmyadmin/tasks/install.yml | 48 ++++++++---------------------- 3 files changed, 15 insertions(+), 38 deletions(-) diff --git a/roles/nextcloud/tasks/install.yml b/roles/nextcloud/tasks/install.yml index 0991a4b3e..0dafb198c 100644 --- a/roles/nextcloud/tasks/install.yml +++ b/roles/nextcloud/tasks/install.yml @@ -94,7 +94,7 @@ - name: Unarchive {{ nextcloud_dl_url }} (100+ MB) to {{ nextcloud_root_dir }} (400+ MB, {{ apache_user }}:{{ apache_user }}) unarchive: - remote_src: yes + remote_src: yes # Overwrite even if "already exists on the target" src: "{{ nextcloud_dl_url }}" #dest: "{{ nextcloud_base_dir }}" # /library/www dest: "{{ nextcloud_root_dir }}" # /library/www/nextcloud diff --git a/roles/phpmyadmin/defaults/main.yml b/roles/phpmyadmin/defaults/main.yml index c2c2eb450..9cfea8dfc 100644 --- a/roles/phpmyadmin/defaults/main.yml +++ b/roles/phpmyadmin/defaults/main.yml @@ -6,5 +6,4 @@ phpmyadmin_version: 5.1.0 phpmyadmin_name: "phpMyAdmin-{{ phpmyadmin_version }}-all-languages" -phpmyadmin_name_zip: "{{ phpmyadmin_name }}.zip" -phpmyadmin_dl_url: "https://files.phpmyadmin.net/phpMyAdmin/{{ phpmyadmin_version }}/{{ phpmyadmin_name_zip }}" +phpmyadmin_dl_url: "https://files.phpmyadmin.net/phpMyAdmin/{{ phpmyadmin_version }}/{{ phpmyadmin_name }}.tar.xz" diff --git a/roles/phpmyadmin/tasks/install.yml b/roles/phpmyadmin/tasks/install.yml index 5c2bbc567..9b8cf357c 100644 --- a/roles/phpmyadmin/tasks/install.yml +++ b/roles/phpmyadmin/tasks/install.yml @@ -8,58 +8,36 @@ name: httpd -- name: Download {{ phpmyadmin_dl_url }} to {{ downloads_dir }} - get_url: - url: "{{ phpmyadmin_dl_url }}" # e.g. https://files.phpmyadmin.net/phpMyAdmin/5.0.4/phpMyAdmin-5.0.4-all-languages.zip - dest: "{{ downloads_dir }}" # /opt/iiab/downloads - timeout: "{{ download_timeout }}" # 200 - when: internet_available - -- name: Does {{ downloads_dir }}/{{ phpmyadmin_name_zip }} exist? - stat: - path: "{{ downloads_dir }}/{{ phpmyadmin_name_zip }}" # e.g. /opt/iiab/downloads/phpMyAdmin-5.0.4-all-languages.zip - register: phpmyadmin_dl - -- name: FAIL (force Ansible to exit) IF {{ downloads_dir }}/{{ phpmyadmin_name_zip }} doesn't exist - fail: - msg: "{{ downloads_dir }}/{{ phpmyadmin_name_zip }} is REQUIRED in order to install phpMyAdmin." - when: not phpmyadmin_dl.stat.exists - -- name: Unzip to permanent location /opt/{{ phpmyadmin_name }}, owned by {{ apache_user }}:root # e.g. /opt/phpMyAdmin-5.0.4-all-languages, owned by www-data:root +- name: Unarchive {{ phpmyadmin_dl_url }} (7+ MB) to /opt (60+ MB) unarchive: - src: "{{ downloads_dir }}/{{ phpmyadmin_name_zip }}" + remote_src: yes # Overwrite even if "already exists on the target" + src: "{{ phpmyadmin_dl_url }}" # e.g. https://files.phpmyadmin.net/phpMyAdmin/5.1.0/phpMyAdmin-5.1.0-all-languages.tar.xv dest: /opt - owner: "{{ apache_user }}" + owner: "{{ apache_user }}" # www-data on debuntu + group: "{{ apache_user }}" + #timeout: "{{ download_timeout }}" # Use get_url if timeout (200s) required + when: internet_available - name: Symlink /opt/phpmyadmin -> {{ phpmyadmin_name }} file: src: "{{ phpmyadmin_name }}" path: /opt/phpmyadmin - owner: "{{ apache_user }}" # Some Linux's ignore symlink owners? + #owner: "{{ apache_user }}" # Generally not used by Linux + #group: "{{ apache_user }}" # Generally not used by Linux state: link -- name: Install /opt/phpmyadmin/config.inc.php owned by {{ apache_user }}:root, from template +- name: Install /opt/phpmyadmin/config.inc.php owned by {{ apache_user }}:{{ apache_user }}, from template template: src: config.inc.php dest: /opt/phpmyadmin/config.inc.php owner: "{{ apache_user }}" + group: "{{ apache_user }}" -# Above 3 stanzas set link/tree/contents ownership to {{ apache_user }}:root -# OOPS: CHOWN BELOW CHANGED LINK ALONE (TREE/CONTENTS REMAINED root:root) - -# - name: Change the owner of the PHP tree to Apache -# shell: "chown -R {{ apache_user }} /opt/phpmyadmin" -# #file: -# # path: "/opt/{{ phpmyadmin_name_zip }}" -# # owner: "{{ apache_user }}" -# # recurse: yes -# # state: directory - -- name: Install /etc/{{ apache_conf_dir }}/phpmyadmin.conf from template, if phpmyadmin_enabled +- name: Install /etc/{{ apache_conf_dir }}/phpmyadmin.conf from template template: src: phpmyadmin.j2 dest: "/etc/{{ apache_conf_dir }}/phpmyadmin.conf" - when: apache_installed is defined + #when: apache_installed is defined # RECORD phpMyAdmin AS INSTALLED From f6cfbcbb75673ecd734265671ab36b2f29e11f8b Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 16:44:51 -0500 Subject: [PATCH 54/95] Tentatively update .travis.yml for syntax checks w/ recent Ubuntu/Python/Ansible --- .travis.yml | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/.travis.yml b/.travis.yml index 83c627442..3b09d8e3c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,27 +1,9 @@ ---- language: python -python: "2.7" - -# Use the new container infrastructure -dist: trusty -sudo: false - -# Install ansible -addons: - apt: - packages: - - python-pip - -install: - # Install ansible - - pip install ansible - - # Create ansible.cfg with correct roles_path and local_tmp - - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" - +python: "3.8" +dist: focal +#install: +## Create ansible.cfg with correct roles_path and local_tmp +#- "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" script: - # Basic role syntax check - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - -#notifications: -# webhooks: https://galaxy.ansible.com/api/v1/notifications/ +- /opt/iiab/iiab/scripts/ansible +- ansible-playbook tests/test.yml -i tests/inventory --syntax-check From 2f11f26ddda08169465425f1f762ea65a65b0c48 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 16:50:44 -0500 Subject: [PATCH 55/95] Preserve more of @arky legacy/hints in .travis.yml --- .travis.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3b09d8e3c..2eb183b9d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,14 @@ language: python python: "3.8" dist: focal +#addons: +# apt: +# packages: +# - python-pip #install: -## Create ansible.cfg with correct roles_path and local_tmp -#- "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" +# - pip install ansible +# # Create ansible.cfg with correct roles_path and local_tmp +# - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" script: - /opt/iiab/iiab/scripts/ansible - ansible-playbook tests/test.yml -i tests/inventory --syntax-check From 7df1f6ae4070b1accd08a62a1bdd373ffc16b8be Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 16:57:40 -0500 Subject: [PATCH 56/95] .travis.yml: /opt/iiab/iiab/scripts/ansible -> scripts/ansible --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2eb183b9d..8e1456b36 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,10 @@ dist: focal # apt: # packages: # - python-pip -#install: +install: + - scripts/ansible # Install latest Ansible & ~4 Ansible Collections (collections.yml) # - pip install ansible # # Create ansible.cfg with correct roles_path and local_tmp # - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" script: -- /opt/iiab/iiab/scripts/ansible -- ansible-playbook tests/test.yml -i tests/inventory --syntax-check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check From 06160fb45d14a30b7e723f5992118553be0d0853 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 17:12:27 -0500 Subject: [PATCH 57/95] Update .travis.yml --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8e1456b36..fce675a18 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,9 @@ dist: focal # packages: # - python-pip install: - - scripts/ansible # Install latest Ansible & ~4 Ansible Collections (collections.yml) -# - pip install ansible +# - scripts/ansible # Fails to install latest Ansible (& ~4 Ansible Collections from collections.yml) +# - pip install ansible # SLOW/OVERWEIGHT: installs Ansible 3.0.0+ with ~80 Ansible Collections + - pip install ansible-base # Let's avoid all Ansible Collections for now (for Ansible syntax check!) # # Create ansible.cfg with correct roles_path and local_tmp # - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" script: From 1f0c409ecb704a6ea86a4db8b380eab30741c27a Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 17:19:13 -0500 Subject: [PATCH 58/95] Update .travis.yml --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fce675a18..0acf5e2d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ install: # - scripts/ansible # Fails to install latest Ansible (& ~4 Ansible Collections from collections.yml) # - pip install ansible # SLOW/OVERWEIGHT: installs Ansible 3.0.0+ with ~80 Ansible Collections - pip install ansible-base # Let's avoid all Ansible Collections for now (for Ansible syntax check!) -# # Create ansible.cfg with correct roles_path and local_tmp -# - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" + - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # Create ansible.cfg with correct roles_path and local_tmp + - cat ansible.cfg # TEMP TESTING script: - ansible-playbook tests/test.yml -i tests/inventory --syntax-check From 7082326ca3ce3a630efd67d59eead044e9785bfb Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 17:25:14 -0500 Subject: [PATCH 59/95] Update .travis.yml --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0acf5e2d4..ca4504492 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,8 @@ install: # - scripts/ansible # Fails to install latest Ansible (& ~4 Ansible Collections from collections.yml) # - pip install ansible # SLOW/OVERWEIGHT: installs Ansible 3.0.0+ with ~80 Ansible Collections - pip install ansible-base # Let's avoid all Ansible Collections for now (for Ansible syntax check!) - - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # Create ansible.cfg with correct roles_path and local_tmp - - cat ansible.cfg # TEMP TESTING + - "{ echo 'roles_path = ./roles/'; } >> ansible.cfg" # Add correct roles_path to ansible.cfg +# - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # Create ansible.cfg with correct roles_path and local_tmp +# - cat ansible.cfg # UNCOMMENT TO VERIFY script: - ansible-playbook tests/test.yml -i tests/inventory --syntax-check From 2fc9f5c4fa4783815b587218d5dbca202cbf4c37 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 17:37:40 -0500 Subject: [PATCH 60/95] Update .travis.yml --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ca4504492..5fec256f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,10 @@ dist: focal # packages: # - python-pip install: -# - scripts/ansible # Fails to install latest Ansible (& ~4 Ansible Collections from collections.yml) +# - scripts/ansible # See #2105: fails to install latest Ansible (& ~4 Ansible Collections from collections.yml) due to Travis VM's disk layout/perms being different # - pip install ansible # SLOW/OVERWEIGHT: installs Ansible 3.0.0+ with ~80 Ansible Collections - pip install ansible-base # Let's avoid all Ansible Collections for now (for Ansible syntax check!) + - ansible-galaxy collection install -r collections.yml - "{ echo 'roles_path = ./roles/'; } >> ansible.cfg" # Add correct roles_path to ansible.cfg # - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # Create ansible.cfg with correct roles_path and local_tmp # - cat ansible.cfg # UNCOMMENT TO VERIFY From 2490551c0632af82e8db9529b24177cd769cf52f Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 17:48:17 -0500 Subject: [PATCH 61/95] Clarify new/working .travis.yml --- .travis.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5fec256f3..d1f7a89df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,20 @@ language: python python: "3.8" dist: focal + #addons: # apt: # packages: # - python-pip + install: # - scripts/ansible # See #2105: fails to install latest Ansible (& ~4 Ansible Collections from collections.yml) due to Travis VM's disk layout/perms being different # - pip install ansible # SLOW/OVERWEIGHT: installs Ansible 3.0.0+ with ~80 Ansible Collections - - pip install ansible-base # Let's avoid all Ansible Collections for now (for Ansible syntax check!) - - ansible-galaxy collection install -r collections.yml - - "{ echo 'roles_path = ./roles/'; } >> ansible.cfg" # Add correct roles_path to ansible.cfg + - pip install ansible-base # Install latest ansible-base 2.10.6+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible + - ansible-galaxy collection install -r collections.yml # Install ~4 Ansible Collections + - "{ echo 'roles_path = ./roles/'; } >> ansible.cfg" # Add correct roles_path to ansible.cfg, appending to https://github.com/iiab/iiab/blob/master/ansible.cfg # - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # Create ansible.cfg with correct roles_path and local_tmp -# - cat ansible.cfg # UNCOMMENT TO VERIFY +# - cat ansible.cfg # UNCOMMENT TO VERIFY! + script: - ansible-playbook tests/test.yml -i tests/inventory --syntax-check From 601b50fc34640f117f3bee2fdaab8c842bd50af9 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 18:57:12 -0500 Subject: [PATCH 62/95] Update .travis.yml --- .travis.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index d1f7a89df..5549301be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,19 @@ language: python -python: "3.8" +python: 3.8 # "3.8" also works dist: focal -#addons: -# apt: -# packages: -# - python-pip +addons: + apt: + sources: + - sourceline: ppa:ansible/ansible + packages: + - ansible-base # Install latest ansible-base e.g. 2.10.6+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible +# - python-pip install: # - scripts/ansible # See #2105: fails to install latest Ansible (& ~4 Ansible Collections from collections.yml) due to Travis VM's disk layout/perms being different # - pip install ansible # SLOW/OVERWEIGHT: installs Ansible 3.0.0+ with ~80 Ansible Collections - - pip install ansible-base # Install latest ansible-base 2.10.6+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible +# - pip install ansible-base # Install latest ansible-base e.g. 2.10.6+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible - ansible-galaxy collection install -r collections.yml # Install ~4 Ansible Collections - "{ echo 'roles_path = ./roles/'; } >> ansible.cfg" # Add correct roles_path to ansible.cfg, appending to https://github.com/iiab/iiab/blob/master/ansible.cfg # - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # Create ansible.cfg with correct roles_path and local_tmp From 69d2dba12919a8a095e95773ce04835028b02752 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 19:12:46 -0500 Subject: [PATCH 63/95] Update .travis.yml --- .travis.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5549301be..3122ecc02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,13 +7,21 @@ addons: sources: - sourceline: ppa:ansible/ansible packages: +# - python-pip # @arky had used this starting in 2018 - ansible-base # Install latest ansible-base e.g. 2.10.6+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible -# - python-pip +# - python3-pymysql # These 7-or-8 packages are not needed during this very rapid --syntax-check +# - python3-psycopg2 +# - python3-passlib +# - python3-pip +# - python3-setuptools + - python3-packaging # To avoid warning "packaging Python module unavailable; unable to validate collection..." +# - python3-venv +# - virtualenv install: # - scripts/ansible # See #2105: fails to install latest Ansible (& ~4 Ansible Collections from collections.yml) due to Travis VM's disk layout/perms being different # - pip install ansible # SLOW/OVERWEIGHT: installs Ansible 3.0.0+ with ~80 Ansible Collections -# - pip install ansible-base # Install latest ansible-base e.g. 2.10.6+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible +# - pip install ansible-base # ALSO WORKS e.g. if the above addons: / apt: section is commented out. To install latest ansible-base e.g. 2.10.6+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible - ansible-galaxy collection install -r collections.yml # Install ~4 Ansible Collections - "{ echo 'roles_path = ./roles/'; } >> ansible.cfg" # Add correct roles_path to ansible.cfg, appending to https://github.com/iiab/iiab/blob/master/ansible.cfg # - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # Create ansible.cfg with correct roles_path and local_tmp From 95e6e72537887a561bd2437cf010a05017518e98 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 19:23:34 -0500 Subject: [PATCH 64/95] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 3122ecc02..3f78f41ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,7 @@ install: - "{ echo 'roles_path = ./roles/'; } >> ansible.cfg" # Add correct roles_path to ansible.cfg, appending to https://github.com/iiab/iiab/blob/master/ansible.cfg # - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # Create ansible.cfg with correct roles_path and local_tmp # - cat ansible.cfg # UNCOMMENT TO VERIFY! + - apt -a list ansible-base # VERIFY ansible-base VERSIONS OFFERED BY apt script: - ansible-playbook tests/test.yml -i tests/inventory --syntax-check From d877bc7d4ff84f315e82673b4479944abedd3a0d Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 20:28:57 -0500 Subject: [PATCH 65/95] .travis.yml: new error when ansible.cfg contains '[defaults]' twice --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3f78f41ba..119893b55 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ install: # - pip install ansible-base # ALSO WORKS e.g. if the above addons: / apt: section is commented out. To install latest ansible-base e.g. 2.10.6+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible - ansible-galaxy collection install -r collections.yml # Install ~4 Ansible Collections - "{ echo 'roles_path = ./roles/'; } >> ansible.cfg" # Add correct roles_path to ansible.cfg, appending to https://github.com/iiab/iiab/blob/master/ansible.cfg -# - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # Create ansible.cfg with correct roles_path and local_tmp +# - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # 2021-02-24: suddenly no longer works, with the newer ansible-base install methods above (error arises due to '[defaults]' appearing twice) # - cat ansible.cfg # UNCOMMENT TO VERIFY! - apt -a list ansible-base # VERIFY ansible-base VERSIONS OFFERED BY apt From 37af2899423b5bc00289ed7e2e21bb8873abb238 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 24 Feb 2021 23:29:59 -0500 Subject: [PATCH 66/95] scripts/ansible installs bionic-or-focal --- scripts/ansible | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index b7060d5b6..4ab31af24 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -6,17 +6,36 @@ 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.10.6" # Orig for 'yum install [rpm]' & XO laptops (pip install) -# We install latest 'ansible-base' from PPA: (may be more recent than GOOD-VER) -# https://launchpad.net/~ansible/+archive/ubuntu/ansible -# https://launchpad.net/~ansible/+archive/ubuntu/ansible-2.10 -# http://ppa.launchpad.net/ansible/ansible/ubuntu/pool/main/a/ansible-base/ -# https://github.com/ansible/ansible/commits/stable-2.10/changelogs/CHANGELOG-v2.10.rst -# IIAB implementers might instead consider these 2 GENERAL TECHNIQUES below +# We install the latest 'ansible-base' from PPA, using an 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 + +# 'ansible-base' RELEASE LINKS FOR REFERENCE: +# http://ppa.launchpad.net/ansible/ansible/ubuntu/pool/main/a/ansible-base/ +# https://launchpad.net/~ansible/+archive/ubuntu/ansible-2.10 +# https://github.com/ansible/ansible/commits/stable-2.10/changelogs/CHANGELOG-v2.10.rst +# https://github.com/ansible/ansible/releases +# https://releases.ansible.com/ansible-base/ + +# FYI .travis.yml installs ansible-base in a slightly different way (PR #2689). + +# IIAB implementers might instead consider these 3 GENERAL TECHNIQUES below # ("in an emergency!") e.g. if you must install an older version of Ansible: -# TEMPORARILY USE ANSIBLE 2.9.17 (REMOVE IT WITH "pip uninstall ansible") -#pip install ansible==2.9.17 +# TEMPORARILY USE ansible-base 2.10.6 (REMOVE W/ "pip3 uninstall ansible-base") +#pip3 install ansible-base==2.10.6 # Start new shell, so /usr/local/bin works +#ansible-galaxy collection install -r collections.yml + +# TEMPORARILY USE ANSIBLE 2.9.18 (REMOVE IT WITH "pip uninstall ansible") +#apt install python-pip +#pip install ansible==2.9.18 # 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" @@ -61,7 +80,7 @@ fi 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" \ +echo "deb 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 @@ -78,7 +97,7 @@ echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main" \ 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 -echo -e 'PPA source "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main"' +echo -e 'PPA source "deb 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' From f2567fd8079ffe273ea5e7c2e56668bd0132644a Mon Sep 17 00:00:00 2001 From: root Date: Thu, 25 Feb 2021 00:00:05 -0500 Subject: [PATCH 67/95] scripts/ansible: document Ansible Collections --- scripts/ansible | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/ansible b/scripts/ansible index 4ab31af24..9000700f5 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -112,11 +112,13 @@ $APT_PATH/apt -y --allow-downgrades install ansible-base \ # (Re)running collection installs appears safe, with --force-with-deps to force # upgrade of collection and dependencies it pulls in. Note Ansible may support -# upgrading all collections cleanly in future. See PRs #2647 #2652 #2653 #2655 +# explicit upgrading of collections (--upgrade / -U flag) in version "2.11" +# with PR ansible/ansible#73336. See also IIAB PRs #2647 #2652 #2653 #2655. echo -e "\n\nIIAB requires these ~4 Ansible Collections: (we upgrade them here if possible!)\n" ansible-galaxy collection install --force-with-deps \ -r /opt/iiab/iiab/collections.yml \ -p /usr/share/ansible/collections +# 2021-02-24: Run 'ansible-galaxy collection list' to list those installed. # 2020-11-28: The ~3 Ansible Collections used by IIAB (~37MB) once lived here: # /root/.ansible/collections/ansible_collections # But going forward they'll be stored herein: From 32e9021fdc4add5d44c7f89ded6ddef4b75b8874 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 25 Feb 2021 08:48:44 -0500 Subject: [PATCH 68/95] scripts/ansible: Minor readability tweaks --- scripts/ansible | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index 9000700f5..3813d7448 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -1,11 +1,11 @@ -#!/bin/bash -e +#!/bin/bash -e # Exit right away on error # PLZ SEE http://FAQ.IIAB.IO > "What is Ansible and what version should I use?" # https://github.com/iiab/iiab/tree/master/scripts/ansible.md -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.10.6" # Orig for 'yum install [rpm]' & XO laptops (pip install) +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.10.6 # Orig for 'yum install [rpm]' & XO laptops (pip install) # We install the latest 'ansible-base' from PPA, using an OS 'CODENAME' below: # https://launchpad.net/~ansible/+archive/ubuntu/ansible From c28900a7dbaa55884692779f5b5232328154fa97 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 25 Feb 2021 08:49:32 -0500 Subject: [PATCH 69/95] Spacing tweak --- scripts/ansible | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ansible b/scripts/ansible index 3813d7448..34cdb485e 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -1,4 +1,4 @@ -#!/bin/bash -e # Exit right away on error +#!/bin/bash -e # Exit right away on error # PLZ SEE http://FAQ.IIAB.IO > "What is Ansible and what version should I use?" # https://github.com/iiab/iiab/tree/master/scripts/ansible.md From 6022d372f0aa80981729ae4cbaf2b0b7f8a4a85a Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 25 Feb 2021 09:10:17 -0500 Subject: [PATCH 70/95] scripts/ansible: "bash -e" is debatable (document it for now) --- scripts/ansible | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/ansible b/scripts/ansible index 34cdb485e..1c3cf8ba9 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -1,4 +1,7 @@ -#!/bin/bash -e # Exit right away on error +#!/bin/bash -e +# FWIW "-e" tries to exit right away on error: +# https://tldp.org/LDP/abs/html/options.html +# https://stackoverflow.com/questions/9952177/whats-the-meaning-of-the-parameter-e-for-bash-shell-command-line/9952249 # PLZ SEE http://FAQ.IIAB.IO > "What is Ansible and what version should I use?" # https://github.com/iiab/iiab/tree/master/scripts/ansible.md From 1565d096b48e68a45031855608438c923a730d76 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 25 Feb 2021 19:22:38 -0500 Subject: [PATCH 71/95] scripts/ansible doc tweak --- scripts/ansible | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ansible b/scripts/ansible index 1c3cf8ba9..2bdff1050 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -74,7 +74,7 @@ echo -e "(Internet-in-a-Box requests ansible-base $GOOD_VER or higher)\n" # Code above designed to work on all Linux distributions, to preserve options, # in support of any volunteer(s) wanting to port IIAB to a new Linux/distro. -if [ ! -f /etc/debian_version ]; then # e.g. Raspbian, Ubuntu, Mint & Debian +if [ ! -f /etc/debian_version ]; then # e.g. RaspiOS, Ubuntu, Mint & Debian echo -e "\nEXITING: /etc/debian_version FILE NOT FOUND. Linux OS support info here:" echo -e " https://github.com/iiab/iiab/wiki/IIAB-Platforms\n" exit 1 From 3c7265ec506abf0963be6188614f6de51c9f0329 Mon Sep 17 00:00:00 2001 From: Tim Moody Date: Fri, 26 Feb 2021 09:42:50 -0500 Subject: [PATCH 72/95] nathansalapat is offline --- vars/raspbian-10.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vars/raspbian-10.yml b/vars/raspbian-10.yml index 3086c0a2c..ecd1494b8 100644 --- a/vars/raspbian-10.yml +++ b/vars/raspbian-10.yml @@ -32,5 +32,6 @@ minetest_server_bin: /library/games/minetest/bin/minetestserver minetest_working_dir: /library/games/minetest minetest_game_dir: /library/games/minetest/games/minetest_game minetest_rpi_src_tar: minetest.5.1.1.tar.gz -minetest_rpi_src_url: "http://www.nathansalapat.com/downloads/{{ minetest_rpi_src_tar }}" +#minetest_rpi_src_url: "http://www.nathansalapat.com/downloads/{{ minetest_rpi_src_tar }}" +minetest_rpi_src_url: "http://d.iiab.io/packages/{{ minetest_rpi_src_tar }}" minetest_rpi_src_untarred: Minetest From 67352afe9dac4868d10e132c408dee3ee887b997 Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 26 Feb 2021 10:29:33 -0500 Subject: [PATCH 73/95] script/ansible: Link to Contributors Guide, summarizing IIAB's use of Ansible --- scripts/ansible | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ansible b/scripts/ansible index 2bdff1050..30dad1d7c 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -5,6 +5,7 @@ # PLZ SEE http://FAQ.IIAB.IO > "What is Ansible and what version should I use?" # https://github.com/iiab/iiab/tree/master/scripts/ansible.md +# https://github.com/iiab/iiab/wiki/IIAB-Contributors-Guide#ansible APT_PATH=/usr/bin # Avoids problematic /usr/local/bin/apt on Linux Mint CURR_VER=undefined # Ansible version you currently have installed From 804ea8e95f4e79c93252dee2722ccd5aa9857002 Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 26 Feb 2021 10:50:35 -0500 Subject: [PATCH 74/95] scripts/ansible: Mention pip3 in addition to pip --- scripts/ansible | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ansible b/scripts/ansible index 30dad1d7c..c0eacea3b 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -57,7 +57,7 @@ echo -e "\n\nYOU ARE RUNNING: /opt/iiab/iiab/scripts/ansible (TO INSTALL ANSIBLE echo -e "RECOMMENDED PREREQUISITES:" echo -e "(1) Verify you're online" echo -e "(2) Remove all prior versions of Ansible using..." -echo -e " 'apt purge ansible-base' and/or 'pip uninstall ansible-base' and/or" +echo -e " 'apt purge ansible-base' and/or 'pip3 uninstall ansible-base' and/or" echo -e " 'apt purge ansible' and/or 'pip uninstall ansible'" echo -e "(3) Remove all lines containing 'ansible' from..." echo -e " /etc/apt/sources.list and /etc/apt/sources.list.d/*\n" From 1df4bef65af780600c8c8ed2d0aa21015542d09e Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 2 Mar 2021 18:55:37 -0500 Subject: [PATCH 75/95] default_vars.yml: WARN that hotspot passwords may FAIL --- vars/default_vars.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index 3afc1edb1..1f7351cc9 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -115,8 +115,8 @@ host_country_code: US host_ssid: Internet in a Box host_wifi_mode: g host_channel: 6 -hostapd_secure: False -hostapd_password: changeme +hostapd_secure: False # 2021-03-02 #2696 WiFi EAPOL fails if hotspot passwords, +hostapd_password: changeme # eg if firmware wifi_hotspot_capacity_rpi_fix: True hostapd_install: True # 2020-01-21: this var MIGHT be implemented in future. hostapd_enabled: True wifi_hotspot_capacity_rpi_fix: True # Restores the ability of RPi internal From 6313b06ee8ac094c783067a8327283e890ce4650 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 2 Mar 2021 18:56:02 -0500 Subject: [PATCH 76/95] local_vars_big.yml: WARN that hotspot passwords may FAIL --- vars/local_vars_big.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index 9ad8bf016..e33de6fa1 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -63,8 +63,8 @@ host_country_code: US host_ssid: Internet in a Box host_wifi_mode: g host_channel: 6 -hostapd_secure: False -hostapd_password: changeme +hostapd_secure: False # 2021-03-02 #2696 WiFi EAPOL fails if hotspot passwords, +hostapd_password: changeme # eg if firmware wifi_hotspot_capacity_rpi_fix: True wifi_hotspot_capacity_rpi_fix: True # Restores the ability of RPi internal # WiFi hotspots to service 30-to-32 client devices. Background explanation: # https://github.com/iiab/iiab/issues/823#issuecomment-662285202 and PR #2472. From 18c40dc2aaf513b360ed9b6494abcb53b8bb5ee6 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 2 Mar 2021 18:56:15 -0500 Subject: [PATCH 77/95] local_vars_medium.yml: WARN that hotspot passwords may FAIL --- vars/local_vars_medium.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index 878c98733..710dfbf17 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -63,8 +63,8 @@ host_country_code: US host_ssid: Internet in a Box host_wifi_mode: g host_channel: 6 -hostapd_secure: False -hostapd_password: changeme +hostapd_secure: False # 2021-03-02 #2696 WiFi EAPOL fails if hotspot passwords, +hostapd_password: changeme # eg if firmware wifi_hotspot_capacity_rpi_fix: True wifi_hotspot_capacity_rpi_fix: True # Restores the ability of RPi internal # WiFi hotspots to service 30-to-32 client devices. Background explanation: # https://github.com/iiab/iiab/issues/823#issuecomment-662285202 and PR #2472. From 90091365d2b14230d33bf5302accc2f3cea07f64 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 2 Mar 2021 18:56:28 -0500 Subject: [PATCH 78/95] local_vars_min.yml: WARN that hotspot passwords may FAIL --- vars/local_vars_min.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index 8a26cc1a2..023139f29 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -63,8 +63,8 @@ host_country_code: US host_ssid: Internet in a Box host_wifi_mode: g host_channel: 6 -hostapd_secure: False -hostapd_password: changeme +hostapd_secure: False # 2021-03-02 #2696 WiFi EAPOL fails if hotspot passwords, +hostapd_password: changeme # eg if firmware wifi_hotspot_capacity_rpi_fix: True wifi_hotspot_capacity_rpi_fix: True # Restores the ability of RPi internal # WiFi hotspots to service 30-to-32 client devices. Background explanation: # https://github.com/iiab/iiab/issues/823#issuecomment-662285202 and PR #2472. From e2a3b44454d1c3c2b6e30e9d10f8e451f87c55e2 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 4 Mar 2021 08:08:46 -0500 Subject: [PATCH 79/95] firmware/tasks/main.yml: Comment typos fixed --- roles/firmware/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/firmware/tasks/main.yml b/roles/firmware/tasks/main.yml index 6b4a5c497..a199f2630 100644 --- a/roles/firmware/tasks/main.yml +++ b/roles/firmware/tasks/main.yml @@ -1,7 +1,7 @@ # Please set 'wifi_hotspot_capacity_rpi_fix: True' in /etc/iiab/local_vars.yml -# to restore support for 30-32 WiFi client devices on any Raspberry Pi that -# has internal WiFi. This installs firmware 7.45.18.0 for Zero W and RPi 3 -# and firmware 7.45.98.65 for RPi 3 B+ and RPi 4. Capacity testing writeup: +# to restore support for 30-32 WiFi client devices on most Raspberry Pis that +# have internal WiFi. This installs firmware 7.45.98.65 for Zero W and RPi 3 +# and firmware 7.45.18.0 for RPi 3 B+ and RPi 4. Capacity testing writeup: # https://github.com/iiab/iiab/issues/823#issuecomment-662285202 - name: Install firmware (for RPi internal WiFi) From 81abb9aecd817213de978d363e93083fe5f85dad Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 4 Mar 2021 10:06:05 -0500 Subject: [PATCH 80/95] Gitea 1.13.2 -> 1.13.3 --- 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 b127ae82c..0301a6e52 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.13.2 +gitea_version: 1.13.3 iset_suffixes: i386: 386 x86_64: amd64 From 8f3f7af866f9a5bfe88c6a07a44656ca7d942d26 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 7 Mar 2021 11:37:12 -0500 Subject: [PATCH 81/95] Gitea 1.13.3 -> 1.13.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 0301a6e52..d335b14e8 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.13.3 +gitea_version: 1.13.4 iset_suffixes: i386: 386 x86_64: amd64 From 2fa9ab6096367af138bc774d0ce875e545ad8f8e Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 7 Mar 2021 11:54:17 -0500 Subject: [PATCH 82/95] scripts/ansible: ansible-base is being renamed to ansible-core (effective soon, in coming weeks) --- scripts/ansible | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/ansible b/scripts/ansible index c0eacea3b..67e978eb7 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -21,12 +21,15 @@ else CODENAME=focal # Debian 11+, RaspiOS 11+, Ubuntu 20.04+, Mint 20+ (ETC) fi -# 'ansible-base' RELEASE LINKS FOR REFERENCE: +# 'ansible-base' being renamed 'ansible-code' early in 2021. RELEASE LINK REFS: # http://ppa.launchpad.net/ansible/ansible/ubuntu/pool/main/a/ansible-base/ # https://launchpad.net/~ansible/+archive/ubuntu/ansible-2.10 # https://github.com/ansible/ansible/commits/stable-2.10/changelogs/CHANGELOG-v2.10.rst +# https://github.com/ansible/ansible/blob/devel/docs/docsite/rst/roadmap/ROADMAP_2_11.rst +# https://www.ansible.com/blog/ansible-3.0.0-qa # https://github.com/ansible/ansible/releases # https://releases.ansible.com/ansible-base/ +# https://releases.ansible.com/ansible-core/ # FYI .travis.yml installs ansible-base in a slightly different way (PR #2689). From 759269c4890ab9b272b28cc83064c981f37cf2ec Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 7 Mar 2021 12:05:57 -0500 Subject: [PATCH 83/95] scripts/ansible: Mention #2659 with 'ansible-galaxy collection list' --- scripts/ansible | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ansible b/scripts/ansible index 67e978eb7..57bc906fe 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -125,7 +125,7 @@ echo -e "\n\nIIAB requires these ~4 Ansible Collections: (we upgrade them here i ansible-galaxy collection install --force-with-deps \ -r /opt/iiab/iiab/collections.yml \ -p /usr/share/ansible/collections -# 2021-02-24: Run 'ansible-galaxy collection list' to list those installed. +# 2021-02-24: 'ansible-galaxy collection list' lists those installed. (#2659) # 2020-11-28: The ~3 Ansible Collections used by IIAB (~37MB) once lived here: # /root/.ansible/collections/ansible_collections # But going forward they'll be stored herein: From 9509c6c1b1fccc3f323a608b1116f019b9d16b64 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 7 Mar 2021 12:48:03 -0500 Subject: [PATCH 84/95] Gitea 1.13.4 -> 1.13 (installs latest point-release from branch release/v1.13 w/o hassling us so often) --- 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 d335b14e8..877783476 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.13.4 +gitea_version: 1.13 # 2021-03-07: Had been fine-grained, e.g. 1.13.4 iset_suffixes: i386: 386 x86_64: amd64 From 2c77593654456de3297478a3ed334ca81e463355 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 7 Mar 2021 15:34:04 -0500 Subject: [PATCH 85/95] kalite/tasks/install.yml: basic cleanup of code & comments --- roles/kalite/tasks/install.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/roles/kalite/tasks/install.yml b/roles/kalite/tasks/install.yml index 6960f73fd..9e6d7ceb9 100644 --- a/roles/kalite/tasks/install.yml +++ b/roles/kalite/tasks/install.yml @@ -14,16 +14,15 @@ - name: Install python2, if Raspbian/Debian > 10 or Ubuntu > 19 package: name: - - python2 - - python-setuptools # provides setuptools-44 last version compatible with python2 + - python2 + - python-setuptools # provides setuptools-44 last version compatible with python2 state: present when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19) # 2020-03-31: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already. - name: Use pip to pin setuptools to 44 in {{ kalite_venv }} if Raspbian/Debian > 10 or Ubuntu > 19 pip: - name: - - setuptools==44 + name: setuptools==44 virtualenv: "{{ kalite_venv }}" # /usr/local/kalite/venv virtualenv_site_packages: no virtualenv_command: /usr/bin/virtualenv @@ -43,7 +42,7 @@ extra_args: "--no-cache-dir" when: internet_available -- name: "Install from templates: venv wrapper /usr/bin/kalite, systemd unit file kalite-serve.service" +- name: "Install from templates: venv wrapper /usr/bin/kalite, unit file /etc/systemd/system/kalite-serve.service" template: src: "{{ item.src }}" dest: "{{ item.dest }}" @@ -52,7 +51,9 @@ - { src: 'kalite.sh.j2', dest: '/usr/bin/kalite', mode: '0755' } - { src: 'kalite-serve.service.j2', dest: '/etc/systemd/system/kalite-serve.service', mode: '0644' } -- name: "Install from template: /etc/{{ apache_conf_dir }}/kalite.conf" +# Useless stanza, for 2 reasons: (1) http://box/kalite was never made to work +# (2) /etc/apache2/sites-available does not exist on many IIAB's w/o Apache +- name: "Install from template: /etc/{{ apache_conf_dir }}/kalite.conf (useless, as http://box/kalite was never made to work)" template: src: kalite.conf dest: "/etc/{{ apache_conf_dir }}" # apache2/sites-available on debuntu @@ -73,7 +74,7 @@ replace: 'a-zA-Z0-9\-' when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19) # 2020-03-31: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already. - # JV why not just is_ubuntu_20? + # JV: why not just is_ubuntu_20? AH: to make this work on Ubuntu 21+ and ideally Debian 11+ too? - name: Create dir {{ kalite_root }} file: From 7ddd6736fefeb9240f3c8ce9260840b639d50b70 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 7 Mar 2021 15:45:25 -0500 Subject: [PATCH 86/95] kalite/tasks/install.yml: a bit more explanatory --- roles/kalite/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kalite/tasks/install.yml b/roles/kalite/tasks/install.yml index 9e6d7ceb9..da5601376 100644 --- a/roles/kalite/tasks/install.yml +++ b/roles/kalite/tasks/install.yml @@ -81,7 +81,7 @@ state: directory path: "{{ kalite_root }}/httpsrv/static" # /library/ka-lite -- name: Run 'kalite manage setup ...' +- name: Run '{{ kalite_program }} manage setup ...' command: "{{ kalite_program }} manage setup --username={{ kalite_admin_user }} --password={{ kalite_admin_password }} --noinput" # Runs /usr/local/kalite/venv/bin/kalite environment: KALITE_HOME: "{{ kalite_root }}" # /library/ka-lite From a26f5a6e2abced7cd6f8914e630986617910872a Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 7 Mar 2021 15:47:46 -0500 Subject: [PATCH 87/95] kalite/tasks/install.yml: clarify in-line comment --- roles/kalite/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kalite/tasks/install.yml b/roles/kalite/tasks/install.yml index da5601376..a81f3e032 100644 --- a/roles/kalite/tasks/install.yml +++ b/roles/kalite/tasks/install.yml @@ -74,7 +74,7 @@ replace: 'a-zA-Z0-9\-' when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19) # 2020-03-31: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already. - # JV: why not just is_ubuntu_20? AH: to make this work on Ubuntu 21+ and ideally Debian 11+ too? + # JV: why not just is_ubuntu_20? AH: to make this work on Ubuntu 21+ and ideally Debian/RaspiOS 11+ too? - name: Create dir {{ kalite_root }} file: From 0cfbe799fddf3f271def7a822c06e13f8fd975f4 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 7 Mar 2021 16:00:28 -0500 Subject: [PATCH 88/95] kalite/tasks/install.yml: Clarifs in Ansible output --- roles/kalite/tasks/install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/kalite/tasks/install.yml b/roles/kalite/tasks/install.yml index a81f3e032..0ba4a0941 100644 --- a/roles/kalite/tasks/install.yml +++ b/roles/kalite/tasks/install.yml @@ -59,7 +59,7 @@ dest: "/etc/{{ apache_conf_dir }}" # apache2/sites-available on debuntu when: apache_installed is defined -- name: Fix KA Lite bug in regex parsing ifconfig output, for @m-anish's network names that contain dashes, if Raspbian/Debian < 11 or Ubuntu < 20 +- name: Fix KA Lite bug in regex parsing ifconfig output (ifcfg/parser.py) for @m-anish's network names that contain dashes, if Raspbian/Debian < 11 or Ubuntu < 20 replace: path: /usr/local/kalite/venv/local/lib/python2.7/site-packages/kalite/packages/dist/ifcfg/parser.py regexp: 'a-zA-Z0-9' @@ -67,7 +67,7 @@ when: is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19 # 2020-03-31: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already. -- name: Fix KA Lite bug in regex parsing ifconfig output, for @m-anish's network names that contain dashes, if Raspbian/Debian > 10 or Ubuntu > 19 +- name: Fix KA Lite bug in regex parsing ifconfig output (ifcfg/parser.py) for @m-anish's network names that contain dashes, if Raspbian/Debian > 10 or Ubuntu > 19 replace: path: /usr/local/kalite/venv/lib/python2.7/site-packages/kalite/packages/dist/ifcfg/parser.py regexp: 'a-zA-Z0-9' From f8d9969ce0d2b6cb389ca97e741c68275eaec7dd Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 7 Mar 2021 16:24:17 -0500 Subject: [PATCH 89/95] Clean up roles/kalite/README.rst --- roles/kalite/README.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/kalite/README.rst b/roles/kalite/README.rst index 354017eb8..6a121db67 100644 --- a/roles/kalite/README.rst +++ b/roles/kalite/README.rst @@ -7,7 +7,7 @@ This role installs KA Lite, an offline version of Khan Academy (https://www.khan KA Lite downloads Khan Academy videos to your Internet-in-a-Box for offline use, with exercises and accounts if students want to track their own progress. -[Originally KA Lite had two servers, a light httpd server that serves Khan Academy videos, and a cron server that sets up cron jobs to download language packs and KA videos from the internet. There were separate flags to enable these two servers.] +[Originally KA Lite had two servers, a light httpd server that served Khan Academy videos, and a cron server that set up cron jobs to download language packs and KA videos from the internet. There were separate flags to enable these two servers.] Using It -------- @@ -36,11 +36,13 @@ Look at `role/kalite/defaults/main.yml `_ *is a wrapper to this virtualenv*. **Consequently, the following steps are no longer needed:** + Starting with KA Lite 0.15 (October 2015) you could run the server manually with the following commands: * systemctl stop kalite-serve (make sure the systemd service is not running) * export KALITE_HOME=/library/ka-lite (point kalite to the right environment) -* kalite start (start the server; can take more than 10 minutes in some environments) +* kalite start (start the server; took several minutes on older environments) To return to using the systemd unit: @@ -48,8 +50,6 @@ To return to using the systemd unit: * kalite stop * systemctl start kalite-serve -*In late 2017, Internet-in-a-Box added a virtual environment (/usr/local/kalite/venv/) to keep KA Lite's Python package/dependency risks under control. As such the command* `/usr/bin/kalite `_ *is a wrapper to this virtualenv.* - More Tips & Tricks ------------------ From 970afab1da67f029f8cdc1b515ab0005ee2e1f48 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 7 Mar 2021 23:17:58 -0500 Subject: [PATCH 90/95] Transmission group change: root to debian-transmission --- roles/transmission/defaults/main.yml | 2 +- roles/transmission/tasks/enable-or-disable.yml | 2 +- vars/default_vars.yml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/transmission/defaults/main.yml b/roles/transmission/defaults/main.yml index 023fbc224..ae49da71b 100644 --- a/roles/transmission/defaults/main.yml +++ b/roles/transmission/defaults/main.yml @@ -7,7 +7,7 @@ # Transmission download directory & general owner/group # transmission_download_dir: "{{ content_base }}/transmission/" # /library/transmission/ # transmission_user: debian-transmission -# transmission_group: root +# transmission_group: debian-transmission # Monitor downloads at http://box:9091 or http://box:9091/transmission using Admin/changeme # transmission_http_port: 9091 diff --git a/roles/transmission/tasks/enable-or-disable.yml b/roles/transmission/tasks/enable-or-disable.yml index a5ec5b3b6..16bb091de 100644 --- a/roles/transmission/tasks/enable-or-disable.yml +++ b/roles/transmission/tasks/enable-or-disable.yml @@ -13,7 +13,7 @@ -n {{ transmission_username }}:{{ transmission_password }} -a http://pantry.learningequality.org/downloads/ka-lite/{{ transmission_kalite_version }}/content/ka-lite-0.17-resized-videos-{{ item }}.torrent with_items: "{{ transmission_kalite_languages }}" - when: transmission_enabled and transmission_provision and transmission_kalite_languages is defined and transmission_kalite_languages is not none + when: transmission_enabled and transmission_provision and transmission_kalite_languages is defined and transmission_kalite_languages is not none # '!= None' also works (i.e. to avoid var value 'null', with type 'NoneType') ignore_errors: yes - name: Disable & Stop 'transmission-daemon' service, if not transmission_enabled diff --git a/vars/default_vars.yml b/vars/default_vars.yml index 1f7351cc9..b85cea197 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -507,11 +507,11 @@ transmission_password: changeme # Transmission download directory & general owner/group transmission_download_dir: "{{ content_base }}/transmission/" # /library/transmission/ transmission_user: debian-transmission -transmission_group: root +transmission_group: debian-transmission # Monitor downloads at http://box:9091 or http://box:9091/transmission using Admin/changeme transmission_http_port: 9091 -transmission_url : /transmission/ +transmission_url: /transmission/ transmission_peer_port: 51413 # Provision Transmission with torrent(s) from http://pantry.learningequality.org/downloads/ka-lite/0.17/content/ From f8c619deac56710f33d0aebf7a19ab07743717b3 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 7 Mar 2021 23:40:43 -0500 Subject: [PATCH 91/95] Update roles/transmission/README.rst --- roles/transmission/README.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/roles/transmission/README.rst b/roles/transmission/README.rst index b61385d5d..4b1f89c87 100644 --- a/roles/transmission/README.rst +++ b/roles/transmission/README.rst @@ -1,3 +1,11 @@ +.. |ss| raw:: html + + + +.. |se| raw:: html + + + =================== Transmission README =================== @@ -68,7 +76,7 @@ You can also download other torrents using Transmission's web interface, or by t Known Issues ------------ -* Default Transmission user/group may need fixing (https://github.com/transmission/transmission/issues/537) in some circumstances. You can set Ansible variables 'transmission_user' and 'transmission_group' e.g. in /opt/iiab/iiab/roles/transmission/defaults/main.yml (you might need 'User=' and 'Group=' in systemd unit file /lib/systemd/system/transmission-daemon.service — e.g. both might need to be set to 'debian-transmission' — if so then run 'systemctl daemon-reload' and 'systemctl restart transmission-daemon'). +* |ss| Default Transmission user/group may need fixing (https://github.com/transmission/transmission/issues/537) in some circumstances. You can set Ansible variables 'transmission_user' and 'transmission_group' e.g. in /opt/iiab/iiab/roles/transmission/defaults/main.yml (you might need 'User=' and 'Group=' in systemd unit file /lib/systemd/system/transmission-daemon.service — e.g. both might need to be set to 'debian-transmission' — if so then run 'systemctl daemon-reload' and 'systemctl restart transmission-daemon'). |se| `PR #2703 `_ * Random Ports: Currently it is not possible to use random ports in the range 49152-65535. It is difficult to open multiple ports in IIAB's iptables-based firewall. From d63c463591820d9e3c86a5fb56e3e35246957831 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 7 Mar 2021 23:45:01 -0500 Subject: [PATCH 92/95] Update roles/transmission/README.rst --- roles/transmission/README.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/roles/transmission/README.rst b/roles/transmission/README.rst index 4b1f89c87..e9e2952dd 100644 --- a/roles/transmission/README.rst +++ b/roles/transmission/README.rst @@ -5,7 +5,10 @@ .. |se| raw:: html - + +.. |nbsp| unicode:: 0xA0 + :trim: + =================== Transmission README =================== @@ -76,7 +79,7 @@ You can also download other torrents using Transmission's web interface, or by t Known Issues ------------ -* |ss| Default Transmission user/group may need fixing (https://github.com/transmission/transmission/issues/537) in some circumstances. You can set Ansible variables 'transmission_user' and 'transmission_group' e.g. in /opt/iiab/iiab/roles/transmission/defaults/main.yml (you might need 'User=' and 'Group=' in systemd unit file /lib/systemd/system/transmission-daemon.service — e.g. both might need to be set to 'debian-transmission' — if so then run 'systemctl daemon-reload' and 'systemctl restart transmission-daemon'). |se| `PR #2703 `_ +* |ss| Default Transmission user/group may need fixing (https://github.com/transmission/transmission/issues/537) in some circumstances. You can set Ansible variables 'transmission_user' and 'transmission_group' e.g. in /opt/iiab/iiab/roles/transmission/defaults/main.yml (you might need 'User=' and 'Group=' in systemd unit file /lib/systemd/system/transmission-daemon.service — e.g. both might need to be set to 'debian-transmission' — if so then run 'systemctl daemon-reload' and 'systemctl restart transmission-daemon'). |se| |nbsp| `PR #2703 `_ * Random Ports: Currently it is not possible to use random ports in the range 49152-65535. It is difficult to open multiple ports in IIAB's iptables-based firewall. From ddb3f25f69c15ff4dde833ff4dca62011e2b444c Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 8 Mar 2021 08:19:03 -0500 Subject: [PATCH 93/95] transmission/tasks/install.yml: update inline comments --- roles/transmission/tasks/install.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/transmission/tasks/install.yml b/roles/transmission/tasks/install.yml index 684b3fe14..a26361a05 100644 --- a/roles/transmission/tasks/install.yml +++ b/roles/transmission/tasks/install.yml @@ -9,8 +9,8 @@ file: state: directory path: "{{ transmission_download_dir }}" # /library/transmission - owner: "{{ transmission_user }}" # debian-transmission - group: "{{ transmission_group }}" # root + owner: "{{ transmission_user }}" # debian-transmission + group: "{{ transmission_group }}" # debian-transmission # mode: '0755' - name: Stop 'transmission-daemon' systemd service, before modifying its settings @@ -23,9 +23,9 @@ template: src: settings.json.j2 dest: /etc/transmission-daemon/settings.json - owner: "{{ transmission_user }}" # debian-transmission - group: "{{ transmission_group }}" # root - # mode: '0644' + owner: "{{ transmission_user }}" # debian-transmission + group: "{{ transmission_group }}" # debian-transmission + # mode: '0600' # RECORD Transmission AS INSTALLED From f11b296a25565b86e31148342e4a904781f95510 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 8 Mar 2021 08:36:51 -0500 Subject: [PATCH 94/95] kalite/tasks/install.yml: cleaner comments / Ansible output --- roles/kalite/tasks/install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/kalite/tasks/install.yml b/roles/kalite/tasks/install.yml index 0ba4a0941..16a9a1341 100644 --- a/roles/kalite/tasks/install.yml +++ b/roles/kalite/tasks/install.yml @@ -5,7 +5,7 @@ timeout: "{{ download_timeout }}" when: internet_available -# 2020-01-19: https://github.com/piwheels/packages/issues/74 says the following is not longer needed... +# 2020-01-19: https://github.com/piwheels/packages/issues/74 says the following is no longer needed... #- name: Run 'mv /etc/pip.conf /etc/pip.conf.see-iiab-issue-2139' as "TEMPORARY" workaround (2020-01-17) for piwheels.org's setuptools Python 2/3 brokenness on RPi (https://github.com/iiab/iiab/issues/2139) # command: mv /etc/pip.conf /etc/pip.conf.see-iiab-issue-2139 # ignore_errors: yes @@ -31,7 +31,7 @@ when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19) # long form of (is_debian_11+ or is_ubuntu_20+) -- name: Use pip to install KA Lite static to {{ kalite_venv }} +- name: Use pip to install ka-lite-static to {{ kalite_venv }} pip: name: ka-lite-static version: "{{ kalite_version }}" From a35d820eabdf565e68e2c6a4463353a3be29fbc6 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 11 Mar 2021 22:36:33 -0500 Subject: [PATCH 95/95] Update calibre-web/tasks/install.yml --- roles/calibre-web/tasks/install.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/calibre-web/tasks/install.yml b/roles/calibre-web/tasks/install.yml index 9f58f1383..b6411b7f4 100644 --- a/roles/calibre-web/tasks/install.yml +++ b/roles/calibre-web/tasks/install.yml @@ -13,13 +13,13 @@ line: ' ' state: present -- name: "Create 3 Calibre-Web folders to store data and config files: {{ calibreweb_home }}, {{ calibreweb_venv_path }}, {{ calibreweb_config }} (all set to {{ calibreweb_user }}:{{ apache_user }}, '0755')" +- name: "Create 3 Calibre-Web folders to store data and config files: {{ calibreweb_home }}, {{ calibreweb_venv_path }}, {{ calibreweb_config }} (all set to {{ calibreweb_user }}:{{ apache_user }})" file: state: directory path: "{{ item }}" owner: "{{ calibreweb_user }}" # root group: "{{ apache_user }}" # www-data on debuntu - mode: '0755' + #mode: '0755' with_items: - "{{ calibreweb_home }}" # /library/calibre-web - "{{ calibreweb_config }}" # /library/calibre-web/config @@ -74,7 +74,7 @@ dest: "{{ calibreweb_home }}" # /library/calibre-web owner: "{{ calibreweb_user }}" # root group: "{{ apache_user }}" # www-data on debuntu - mode: '0644' + #mode: '0644' backup: yes with_items: - roles/calibre-web/files/metadata.db @@ -88,7 +88,7 @@ dest: "{{ calibreweb_config }}" # /library/calibre-web/config owner: "{{ calibreweb_user }}" # root group: "{{ apache_user }}" # www-data on debuntu - mode: '0644' + #mode: '0644' backup: yes when: not metadatadb.stat.exists #when: calibreweb_provision