From 9df0ad6ea154b044672bbef90afef434f32a675a Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 9 Mar 2020 13:22:54 -0400 Subject: [PATCH 01/34] Update iiab_ini.yml --- roles/0-init/tasks/iiab_ini.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/0-init/tasks/iiab_ini.yml b/roles/0-init/tasks/iiab_ini.yml index 9230c603c..b5c3b29d3 100644 --- a/roles/0-init/tasks/iiab_ini.yml +++ b/roles/0-init/tasks/iiab_ini.yml @@ -35,7 +35,7 @@ value: "{{ ansible_local.local_facts.iiab_commit }}" - option: install_date value: "{{ ansible_date_time.iso8601 }}" - - option: install_xo + - option: xo_model value: "{{ xo_model }}" - - option: is_rpi + - option: rpi_model value: "{{ rpi_model }}" From a6bf566d4ec5ddac3e2b2e613a0a8939d6e1a841 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 9 Mar 2020 13:24:11 -0400 Subject: [PATCH 02/34] another is_rpi -> rpi_model for /etc/iiab/iiab.ini --- 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 427377084..6e546a6f8 100644 --- a/roles/0-init/tasks/main.yml +++ b/roles/0-init/tasks/main.yml @@ -209,7 +209,7 @@ value: "{{ gw_active }}" - option: internet_available value: "{{ internet_available }}" - - option: is_rpi + - option: rpi_model value: "{{ rpi_model }}" - option: first_run value: "{{ first_run }}" From b8163a1e7c3ef9fa7fc5921ac48806968b427d0d Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Mon, 9 Mar 2020 12:43:05 -0500 Subject: [PATCH 03/34] network - missing and #2284 --- roles/network/tasks/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/network/tasks/debian.yml b/roles/network/tasks/debian.yml index 230de8432..74ca452c7 100644 --- a/roles/network/tasks/debian.yml +++ b/roles/network/tasks/debian.yml @@ -41,7 +41,7 @@ template: dest: /etc/network/interfaces.d/iiab src: network/systemd.j2 - when: not is_raspbian (iiab_lan_iface == "br0" or wan_ip != "dhcp" or gui_static_wan_ip == "undefined") + when: not is_raspbian and (iiab_lan_iface == "br0" or wan_ip != "dhcp" or gui_static_wan_ip == "undefined") - name: Copy the bridge script for RPi template: From 9dedee871cb825998de180743361c314eb430245 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Mon, 9 Mar 2020 12:46:13 -0500 Subject: [PATCH 04/34] always pre-install python3-venv --- scripts/ansible | 2 +- scripts/ansible-2.8.x | 2 +- scripts/ansible-2.9.x | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index 83d9338e5..c74af4427 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -78,7 +78,7 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian echo -e "https://github.com/iiab/iiab/tree/master/scripts/ansible.md\n" apt update apt -y --allow-downgrades install ansible python3-pymysql python3-psycopg2 \ - python3-passlib python3-pip python3-setuptools virtualenv + python3-passlib python3-pip python3-setuptools python3-venv virtualenv echo -e "\nSUCCESS: verify Ansible using 'ansible --version' and/or 'apt -a list ansible'\n\n" diff --git a/scripts/ansible-2.8.x b/scripts/ansible-2.8.x index 3f0d94ad7..4d57bd1d1 100755 --- a/scripts/ansible-2.8.x +++ b/scripts/ansible-2.8.x @@ -78,7 +78,7 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian echo -e "https://github.com/iiab/iiab/tree/master/scripts/ansible.md\n" apt update apt -y --allow-downgrades install ansible python3-pymysql python3-psycopg2 \ - python3-passlib python3-pip python3-setuptools virtualenv + python3-passlib python3-pip python3-setuptools python3-venv virtualenv echo -e "\nSUCCESS: verify Ansible using 'ansible --version' and/or 'apt -a list ansible'\n\n" diff --git a/scripts/ansible-2.9.x b/scripts/ansible-2.9.x index cc36834a7..81bfce59a 100755 --- a/scripts/ansible-2.9.x +++ b/scripts/ansible-2.9.x @@ -78,7 +78,7 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian echo -e "https://github.com/iiab/iiab/tree/master/scripts/ansible.md\n" apt update apt -y --allow-downgrades install ansible python3-pymysql python3-psycopg2 \ - python3-passlib python3-pip python3-setuptools virtualenv + python3-passlib python3-pip python3-setuptools python3-venv virtualenv echo -e "\nSUCCESS: verify Ansible using 'ansible --version' and/or 'apt -a list ansible'\n\n" From e8fdcbf59e8d267097ea14cd54eb882f53973183 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Mon, 9 Mar 2020 12:51:26 -0500 Subject: [PATCH 05/34] cover calibre-web use of python3-venv for those who have ansible already installed --- roles/calibre-web/tasks/install.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/calibre-web/tasks/install.yml b/roles/calibre-web/tasks/install.yml index 05557a611..6c35db157 100644 --- a/roles/calibre-web/tasks/install.yml +++ b/roles/calibre-web/tasks/install.yml @@ -1,6 +1,8 @@ - name: "Install ImageMagick package: imagemagick" package: - name: imagemagick + name: + - imagemagick + - python3-venv state: present - name: Allow ImageMagick to read PDFs, per /etc/ImageMagick-6/policy.xml, to create book cover thumbnails From 1b4f928c1f26816e70da5cd253fd32d1d931aca5 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 11 Mar 2020 00:14:15 -0400 Subject: [PATCH 06/34] Gitea 1.11.2 -> 1.11.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 ba9ed7d77..69ccefb26 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.11.2 +gitea_version: 1.11.3 iset_suffixes: i386: 386 x86_64: amd64 From fde51539c53c73e57a4ba79bc0fad1742fb02841 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sat, 14 Mar 2020 22:27:13 -0500 Subject: [PATCH 07/34] default rtc_id to none --- roles/0-init/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/0-init/defaults/main.yml b/roles/0-init/defaults/main.yml index 14f589397..9fd76d2e4 100644 --- a/roles/0-init/defaults/main.yml +++ b/roles/0-init/defaults/main.yml @@ -18,7 +18,7 @@ exFAT_enabled: False is_F18: False # Set default 1-prep discovered hardware -rtc_id: ds3231 +rtc_id: none NUC6_firmware_needed: False # Used in 2-common/tasks/xo.yml From 5eaa5baf3b3b33745c9d0612a3a34c7b61d13822 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sat, 14 Mar 2020 22:30:45 -0500 Subject: [PATCH 08/34] ubuntu mounts the first partition differently - limit swapfile mods to raspbian --- roles/1-prep/tasks/raspberry_pi.yml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/roles/1-prep/tasks/raspberry_pi.yml b/roles/1-prep/tasks/raspberry_pi.yml index 5253fb95a..a6b4b3a33 100644 --- a/roles/1-prep/tasks/raspberry_pi.yml +++ b/roles/1-prep/tasks/raspberry_pi.yml @@ -10,22 +10,19 @@ when: rtc_id is defined and rtc_id != "none" # RTC requires a change to the device tree (and reboot) -- name: Enable i2c-rtc device (with "dtoverlay=i2c-rtc,{{ rtc_id }}=on" in /boot/config.txt, requires reboot!) if rtc_id is defined and rtc_id != "none" +- name: Enable i2c-rtc device (with "dtoverlay=i2c-rtc,{{ rtc_id }}=on" in /boot/config.txt, requires reboot!) if rtc_id is defined and rtc_id != "none" and is_raspbian lineinfile: path: /boot/config.txt line: "dtoverlay=i2c-rtc,{{ rtc_id }}=on" state: present - register: rpiconfig # HMMM REGISTER "rpiconfig" IS *COMPLETELY UNUSED* AS OF 2018-11-02 - when: rtc_id is defined and rtc_id != "none" + when: rtc_id is defined and rtc_id != "none" and is_raspbian -#- name: Install udev rule /etc/udev/rules.d/92-rtc-i2c.rules from template, to transfer hwclock to system clock at dev creation, if rtc_id != "none" -# template: -# src: 92-rtc-i2c.rules -# dest: /etc/udev/rules.d/92-rtc-i2c.rules -# owner: root -# group: root -# mode: 0644 -# when: rtc_id != "none" +- name: Enable i2c-rtc device (with "dtoverlay=i2c-rtc,{{ rtc_id }}=on" in /boot/firmware/config.txt, requires reboot!) if rtc_id is defined and rtc_id != "none" and is_ubuntu + lineinfile: + path: /boot/firmware/config.txt + line: "dtoverlay=i2c-rtc,{{ rtc_id }}=on" + state: present + when: rtc_id is defined and rtc_id != "none" and is_ubuntu - name: Install latest ntp package package: @@ -37,14 +34,14 @@ path: /etc/dphys-swapfile regexp: "^CONF_SWAPSIZE" line: "CONF_SWAPSIZE={{ pi_swap_file_size }}" - when: is_debuntu | bool # Redundant, given raspberry_pi.yml is only run when rpi_model: != "none" Until someone tries a non-debuntu OS on RPi? + when: is_raspbian | bool - name: Restart swap service "dphys-swapfile" (debuntu) #command: /etc/init.d/dphys-swapfile restart service: # A rare/legacy service that is NOT systemd name: dphys-swapfile state: restarted - when: is_debuntu | bool + when: is_raspbian | bool - name: Install RPi rootfs resizing (iiab-rpi-max-rootfs.sh) and its systemd service (iiab-rpi-root-resize.service), from templates template: From eca80a289a563a245408b398c6363be3edf7882a Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sat, 14 Mar 2020 22:51:57 -0500 Subject: [PATCH 09/34] modern OS are shipping systemd-timesyncd pre-enabled other packages not needed ntp and chrony actually conflict with each other --- roles/1-prep/tasks/main.yml | 13 ------------- roles/1-prep/tasks/raspberry_pi.yml | 5 ----- 2 files changed, 18 deletions(-) diff --git a/roles/1-prep/tasks/main.yml b/roles/1-prep/tasks/main.yml index 97dd3fa26..a3f32efa5 100644 --- a/roles/1-prep/tasks/main.yml +++ b/roles/1-prep/tasks/main.yml @@ -77,19 +77,6 @@ name: openvpn when: openvpn_install | bool -# for rpi, without rtc, we need time as soon as possible -- name: Install chrony (an NTP package) especially for RPi's lacking RTC - package: - name: chrony - state: present - -#TODO: Use regexp filter instead of hard-code ip -- name: Install /etc/chrony.conf from template - template: - src: chrony.conf.j2 - dest: /etc/chrony.conf - backup: no - # Debian 10 "Buster" is apparently enabling AppArmor in 2019: # https://wiki.debian.org/AppArmor/Progress # https://wiki.debian.org/AppArmor/HowToUse diff --git a/roles/1-prep/tasks/raspberry_pi.yml b/roles/1-prep/tasks/raspberry_pi.yml index a6b4b3a33..c2be2682b 100644 --- a/roles/1-prep/tasks/raspberry_pi.yml +++ b/roles/1-prep/tasks/raspberry_pi.yml @@ -24,11 +24,6 @@ state: present when: rtc_id is defined and rtc_id != "none" and is_ubuntu -- name: Install latest ntp package - package: - name: ntp - state: latest - - name: Increase swap file size (to CONF_SWAPSIZE={{ pi_swap_file_size }} in /etc/dphys-swapfile) as kalite pip download fails (debuntu) lineinfile: path: /etc/dphys-swapfile From cbca4a72ad2f5c48a0fe929407055098595b3b5d Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sun, 15 Mar 2020 00:02:51 -0500 Subject: [PATCH 10/34] ubuntu 20 workaround --- scripts/ansible | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index c74af4427..62a231f0e 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -67,13 +67,14 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian echo -e "\napt update; install dirmngr; PPA to /etc/apt/sources.list.d/iiab-ansible.list\n" apt update - apt -y install dirmngr # Raspbian needs. Formerly: python-pip python-setuptools python-wheel patch - echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main" \ + if ! [ `cat /etc/os-release | grep UBUNTU_CODENAME= | awk -F "=" '{print $2}'` == "focal"]; then + apt -y install dirmngr + echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main" \ > /etc/apt/sources.list.d/iiab-ansible.list - echo -e '\nIF YOU FACE ERROR "signatures couldn'"'"'t be verified because the public key is not available" THEN REPEATEDLY RE-RUN "sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 93C4A3FD7BB9C367"\n' - apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 93C4A3FD7BB9C367 - + 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 + fi echo -e "\napt update; apt install ansible and python3 dependencies explained at:" echo -e "https://github.com/iiab/iiab/tree/master/scripts/ansible.md\n" apt update From e48d56dfb95d0d6a1ef0e7cd02926fad10e59cca Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sun, 15 Mar 2020 01:27:45 -0500 Subject: [PATCH 11/34] ensure dphys-swapfile fake-hwclock are installed --- roles/1-prep/tasks/raspberry_pi.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/roles/1-prep/tasks/raspberry_pi.yml b/roles/1-prep/tasks/raspberry_pi.yml index c2be2682b..423338511 100644 --- a/roles/1-prep/tasks/raspberry_pi.yml +++ b/roles/1-prep/tasks/raspberry_pi.yml @@ -24,12 +24,18 @@ state: present when: rtc_id is defined and rtc_id != "none" and is_ubuntu +- name: Install dphys-swapfile fake-hwclock + package: + name: + - dphys-swapfile + - fake-hwclock + state: present + - name: Increase swap file size (to CONF_SWAPSIZE={{ pi_swap_file_size }} in /etc/dphys-swapfile) as kalite pip download fails (debuntu) lineinfile: path: /etc/dphys-swapfile regexp: "^CONF_SWAPSIZE" line: "CONF_SWAPSIZE={{ pi_swap_file_size }}" - when: is_raspbian | bool - name: Restart swap service "dphys-swapfile" (debuntu) #command: /etc/init.d/dphys-swapfile restart From 49a137ddcd2bf30733efad9e5f3e152f867b8e6c Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sun, 15 Mar 2020 01:30:49 -0500 Subject: [PATCH 12/34] ensure dphys-swapfile is restarted --- roles/1-prep/tasks/raspberry_pi.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/1-prep/tasks/raspberry_pi.yml b/roles/1-prep/tasks/raspberry_pi.yml index 423338511..9fdbbe757 100644 --- a/roles/1-prep/tasks/raspberry_pi.yml +++ b/roles/1-prep/tasks/raspberry_pi.yml @@ -42,7 +42,6 @@ service: # A rare/legacy service that is NOT systemd name: dphys-swapfile state: restarted - when: is_raspbian | bool - name: Install RPi rootfs resizing (iiab-rpi-max-rootfs.sh) and its systemd service (iiab-rpi-root-resize.service), from templates template: From 9cfbbd0d582e18166aecb2ce678939b4b38f3886 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sun, 15 Mar 2020 01:54:57 -0500 Subject: [PATCH 13/34] usercfg.txt on ubuntu --- roles/1-prep/tasks/raspberry_pi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/1-prep/tasks/raspberry_pi.yml b/roles/1-prep/tasks/raspberry_pi.yml index 9fdbbe757..5db46d8b1 100644 --- a/roles/1-prep/tasks/raspberry_pi.yml +++ b/roles/1-prep/tasks/raspberry_pi.yml @@ -19,7 +19,7 @@ - name: Enable i2c-rtc device (with "dtoverlay=i2c-rtc,{{ rtc_id }}=on" in /boot/firmware/config.txt, requires reboot!) if rtc_id is defined and rtc_id != "none" and is_ubuntu lineinfile: - path: /boot/firmware/config.txt + path: /boot/firmware/usercfg.txt line: "dtoverlay=i2c-rtc,{{ rtc_id }}=on" state: present when: rtc_id is defined and rtc_id != "none" and is_ubuntu From b0c9e19023715d54407f313d41dfa0a4617eceb0 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sun, 15 Mar 2020 02:10:27 -0500 Subject: [PATCH 14/34] ubuntu-20 --- scripts/local_facts.fact | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/local_facts.fact b/scripts/local_facts.fact index bc16645f3..5b60bbe08 100755 --- a/scripts/local_facts.fact +++ b/scripts/local_facts.fact @@ -28,6 +28,7 @@ case $OS_VER in "ubuntu-17" | \ "ubuntu-18" | \ "ubuntu-19" | \ + "ubuntu-20" | \ "centos-7" | \ "raspbian-8" | \ "raspbian-9" | \ From 8223ad9966a756d55f39659803e17f83961eae46 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sun, 15 Mar 2020 02:42:26 -0500 Subject: [PATCH 15/34] rework the ubuntu-20 test --- scripts/ansible | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index 62a231f0e..2a1664db5 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -67,7 +67,8 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian echo -e "\napt update; install dirmngr; PPA to /etc/apt/sources.list.d/iiab-ansible.list\n" apt update - if ! [ `cat /etc/os-release | grep UBUNTU_CODENAME= | awk -F "=" '{print $2}'` == "focal"]; then + IS_U20?=`cat /etc/os-release | grep UBUNTU_CODENAME= | awk -F "=" '{print $2}'` + if [ "$IS_20?" != "focal" ]; then apt -y install dirmngr echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main" \ > /etc/apt/sources.list.d/iiab-ansible.list @@ -92,12 +93,11 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian #wget http://download.iiab.io/packages/ansible_2.4.2.0-1ppa~xenial_all.deb #apt -y --allow-downgrades install ./ansible_2.4.2.0-1ppa~xenial_all.deb - echo -e 'PPA source "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main"' - echo -e "successfully saved to /etc/apt/sources.list.d/iiab-ansible.list\n" - - echo -e "IF *OTHER* ANSIBLE SOURCES APPEAR BELOW, PLEASE MANUALLY REMOVE THEM TO" - echo -e 'ENSURE ANSIBLE UPDATES CLEANLY: (then re-run this script to be sure!)\n' - grep '^deb .*ansible' /etc/apt/sources.list /etc/apt/sources.list.d/*.list | grep -v '^/etc/apt/sources.list.d/iiab-ansible.list:' || true # Override bash -e (instead of aborting at 1st error) +# echo -e 'PPA source "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main"' +# echo -e "successfully saved to /etc/apt/sources.list.d/iiab-ansible.list\n" +# echo -e "IF *OTHER* ANSIBLE SOURCES APPEAR BELOW, PLEASE MANUALLY REMOVE THEM TO" +# echo -e 'ENSURE ANSIBLE UPDATES CLEANLY: (then re-run this script to be sure!)\n' +# grep '^deb .*ansible' /etc/apt/sources.list /etc/apt/sources.list.d/*.list | grep -v '^/etc/apt/sources.list.d/iiab-ansible.list:' || true # Override bash -e (instead of aborting at 1st error) else echo -e "\nEXITING: Could not detect your OS (unsupported?)\n" exit 1 From 629acf49a04ed32095d2ac863794545d3eb564c1 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sun, 15 Mar 2020 03:56:12 -0500 Subject: [PATCH 16/34] drop ? --- scripts/ansible | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index 2a1664db5..22a947852 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -67,8 +67,8 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian echo -e "\napt update; install dirmngr; PPA to /etc/apt/sources.list.d/iiab-ansible.list\n" apt update - IS_U20?=`cat /etc/os-release | grep UBUNTU_CODENAME= | awk -F "=" '{print $2}'` - if [ "$IS_20?" != "focal" ]; then + IS_U20=`cat /etc/os-release | grep UBUNTU_CODENAME= | awk -F "=" '{print $2}'` + if [ "$IS_20" != "focal" ]; then apt -y install dirmngr echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main" \ > /etc/apt/sources.list.d/iiab-ansible.list From 41cb25b82b7ccadc2a2325700bd0eee1c6379741 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sun, 15 Mar 2020 04:55:40 -0500 Subject: [PATCH 17/34] say as I do --- scripts/ansible | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index 22a947852..39c20377d 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -64,11 +64,10 @@ elif [ -f /etc/centos-release ]; then #elif [ -f /etc/debian_version ] || (grep -qi raspbian /etc/*elease) ; then #elif [ ! -f /etc/centos-release ] && [ ! -f /etc/fedora-release ] && [ ! -f /etc/olpc-release ]; then elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian - - echo -e "\napt update; install dirmngr; PPA to /etc/apt/sources.list.d/iiab-ansible.list\n" - apt update IS_U20=`cat /etc/os-release | grep UBUNTU_CODENAME= | awk -F "=" '{print $2}'` if [ "$IS_20" != "focal" ]; then + echo -e "\napt update; install dirmngr; PPA to /etc/apt/sources.list.d/iiab-ansible.list\n" + apt update apt -y install dirmngr echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main" \ > /etc/apt/sources.list.d/iiab-ansible.list From 9d331e8262bc66fc2c09308490bcd6ab41f9e52e Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sun, 15 Mar 2020 06:14:54 -0500 Subject: [PATCH 18/34] bluetooth needs a kick on ubuntu --- roles/1-prep/tasks/raspberry_pi.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/1-prep/tasks/raspberry_pi.yml b/roles/1-prep/tasks/raspberry_pi.yml index 5db46d8b1..cf8fbdc81 100644 --- a/roles/1-prep/tasks/raspberry_pi.yml +++ b/roles/1-prep/tasks/raspberry_pi.yml @@ -24,6 +24,13 @@ state: present when: rtc_id is defined and rtc_id != "none" and is_ubuntu +- name: Enable bluetooth in /boot/firmware/syscfg.txt on Ubuntu (needs reboot) + lineinfile: + path: /boot/firmware/syscfg.txt + regexp: '^include*' + line: 'include btcfg.txt' + when: is_ubuntu + - name: Install dphys-swapfile fake-hwclock package: name: From 12020f891e0964132f6b67543750cfcf5d85279e Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sun, 15 Mar 2020 07:17:30 -0500 Subject: [PATCH 19/34] moved --- scripts/ansible | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index 39c20377d..d222a89d2 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -74,6 +74,11 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian 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 "successfully saved to /etc/apt/sources.list.d/iiab-ansible.list\n" + echo -e "IF *OTHER* ANSIBLE SOURCES APPEAR BELOW, PLEASE MANUALLY REMOVE THEM TO" + echo -e 'ENSURE ANSIBLE UPDATES CLEANLY: (then re-run this script to be sure!)\n' + grep '^deb .*ansible' /etc/apt/sources.list /etc/apt/sources.list.d/*.list | grep -v '^/etc/apt/sources.list.d/iiab-ansible.list:' || true # Override bash -e (instead of aborting at 1st error) fi echo -e "\napt update; apt install ansible and python3 dependencies explained at:" echo -e "https://github.com/iiab/iiab/tree/master/scripts/ansible.md\n" @@ -92,11 +97,6 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian #wget http://download.iiab.io/packages/ansible_2.4.2.0-1ppa~xenial_all.deb #apt -y --allow-downgrades install ./ansible_2.4.2.0-1ppa~xenial_all.deb -# echo -e 'PPA source "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main"' -# echo -e "successfully saved to /etc/apt/sources.list.d/iiab-ansible.list\n" -# echo -e "IF *OTHER* ANSIBLE SOURCES APPEAR BELOW, PLEASE MANUALLY REMOVE THEM TO" -# echo -e 'ENSURE ANSIBLE UPDATES CLEANLY: (then re-run this script to be sure!)\n' -# grep '^deb .*ansible' /etc/apt/sources.list /etc/apt/sources.list.d/*.list | grep -v '^/etc/apt/sources.list.d/iiab-ansible.list:' || true # Override bash -e (instead of aborting at 1st error) else echo -e "\nEXITING: Could not detect your OS (unsupported?)\n" exit 1 From 18d90787f1307f3b207ff781ce6129b7152f9dad Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Thu, 19 Mar 2020 00:45:02 -0500 Subject: [PATCH 20/34] simplify ubuntu-20 test --- scripts/ansible | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index d222a89d2..2e7875ea5 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -64,8 +64,7 @@ elif [ -f /etc/centos-release ]; then #elif [ -f /etc/debian_version ] || (grep -qi raspbian /etc/*elease) ; then #elif [ ! -f /etc/centos-release ] && [ ! -f /etc/fedora-release ] && [ ! -f /etc/olpc-release ]; then elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian - IS_U20=`cat /etc/os-release | grep UBUNTU_CODENAME= | awk -F "=" '{print $2}'` - if [ "$IS_20" != "focal" ]; then + if ! grep -q focal /etc/os-release; then echo -e "\napt update; install dirmngr; PPA to /etc/apt/sources.list.d/iiab-ansible.list\n" apt update apt -y install dirmngr From e66766c88e0130ce8f095364f6f4f86d0f57ce08 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Thu, 19 Mar 2020 05:09:53 -0500 Subject: [PATCH 21/34] ubuntu missing iw rfkill --- roles/1-prep/tasks/raspberry_pi.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/1-prep/tasks/raspberry_pi.yml b/roles/1-prep/tasks/raspberry_pi.yml index cf8fbdc81..792feae96 100644 --- a/roles/1-prep/tasks/raspberry_pi.yml +++ b/roles/1-prep/tasks/raspberry_pi.yml @@ -31,11 +31,13 @@ line: 'include btcfg.txt' when: is_ubuntu -- name: Install dphys-swapfile fake-hwclock +- name: Ensure dphys-swapfile fake-hwclock iw rkill are installed package: name: - dphys-swapfile - fake-hwclock + - iw + - rfkill state: present - name: Increase swap file size (to CONF_SWAPSIZE={{ pi_swap_file_size }} in /etc/dphys-swapfile) as kalite pip download fails (debuntu) From b4a086413c246877deadc60b99dda3f0a7e07fef Mon Sep 17 00:00:00 2001 From: George Hunt Date: Mon, 2 Mar 2020 18:12:13 +0000 Subject: [PATCH 22/34] enable aarch64 in kiwix, disable stem.php --- roles/kiwix/tasks/install.yml | 2 +- roles/nginx/tasks/install.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/kiwix/tasks/install.yml b/roles/kiwix/tasks/install.yml index c2fb6fa6c..d8b5c59c8 100644 --- a/roles/kiwix/tasks/install.yml +++ b/roles/kiwix/tasks/install.yml @@ -7,7 +7,7 @@ - name: "Set fact 'kiwix_src_dir: {{ kiwix_version_armhf }}' (armv6l or armv71)" set_fact: kiwix_src_dir: "{{ kiwix_version_armhf }}" - when: ansible_machine == "armv7l" or ansible_machine == "armv6l" + when: ansible_machine == "armv7l" or ansible_machine == "armv6l" or ansible_machine == "aarch64" - name: "Set fact 'kiwix_src_dir: {{ kiwix_version_linux64 }}' (x86_64)" set_fact: diff --git a/roles/nginx/tasks/install.yml b/roles/nginx/tasks/install.yml index 3d6c23bfb..bdd0333b9 100644 --- a/roles/nginx/tasks/install.yml +++ b/roles/nginx/tasks/install.yml @@ -56,7 +56,7 @@ src: "/etc/php/{{ php_version }}/mods-available/stem.ini" path: "/etc/php/{{ php_version }}/fpm/conf.d/20-stem.ini" state: link - #when: nginx_enabled | bool + when: not is_ubuntu | bool - name: Restart php{{ php_version }}-fpm systemd service systemd: From 852cddf222e2c8656796d57bdd9d86fe6e248f20 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Tue, 3 Mar 2020 08:11:53 -0800 Subject: [PATCH 23/34] add in stem changes from Tim --- roles/www_base/tasks/php-stem.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/roles/www_base/tasks/php-stem.yml b/roles/www_base/tasks/php-stem.yml index bba0059c6..6417a2475 100644 --- a/roles/www_base/tasks/php-stem.yml +++ b/roles/www_base/tasks/php-stem.yml @@ -11,7 +11,17 @@ group: root #mode: ???? remote_src: yes - when: is_raspbian | bool + when: ansible_machine == "armv7l" + +- name: Unarchive http://download.iiab.io/packages/php{{ php_version }}-stem.aarch64.tar to / (rpi) + unarchive: + src: http://download.iiab.io/packages/php{{ php_version }}-stem.aarch64.tar + dest: / + owner: root + group: root + #mode: ???? + remote_src: yes + when: ansible_machine == "aarch64" - name: Unarchive http://download.iiab.io/packages/php{{ php_version }}-stem.x64.tar to / (x64) unarchive: From d17790836611ca840f7b984f2f30671e0cea1c1d Mon Sep 17 00:00:00 2001 From: George Hunt Date: Tue, 3 Mar 2020 08:16:15 -0800 Subject: [PATCH 24/34] enable stem link again --- roles/nginx/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/nginx/tasks/install.yml b/roles/nginx/tasks/install.yml index bdd0333b9..3d6c23bfb 100644 --- a/roles/nginx/tasks/install.yml +++ b/roles/nginx/tasks/install.yml @@ -56,7 +56,7 @@ src: "/etc/php/{{ php_version }}/mods-available/stem.ini" path: "/etc/php/{{ php_version }}/fpm/conf.d/20-stem.ini" state: link - when: not is_ubuntu | bool + #when: nginx_enabled | bool - name: Restart php{{ php_version }}-fpm systemd service systemd: From 04368ffbe9439af1fad27d5b15a26542aa8365dd Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Thu, 19 Mar 2020 05:42:00 -0500 Subject: [PATCH 25/34] move Ubermix workaround --- roles/1-prep/tasks/main.yml | 8 ++++++++ roles/kalite/tasks/install.yml | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/roles/1-prep/tasks/main.yml b/roles/1-prep/tasks/main.yml index 97dd3fa26..4cdefaa66 100644 --- a/roles/1-prep/tasks/main.yml +++ b/roles/1-prep/tasks/main.yml @@ -62,6 +62,14 @@ when: grep_ubermix.rc == 0 # 1 if absent in file, 2 if file doesn't exist #when: ro_dir.stat.exists +# This effectively does nothing at all on Ubuntu & Raspbian, where libgeos-* +# pkgs are not installed FWIW. But it's included to safeguard us across all +# OS's, in case others OS's like Ubermix later appear. See #1382 for details. +# Removing pkgs libgeos-3.6.2 & libgeos-c1v5 fixed the situation on Ubermix! +- name: Remove libgeos-* pkgs, avoiding KA Lite Django failure on Ubermix + shell: apt -y remove "libgeos-*" + when: grep_ubermix.rc == 0 # 1 if absent in file, 2 if file doesn't exist + - name: SSHD include_role: name: sshd diff --git a/roles/kalite/tasks/install.yml b/roles/kalite/tasks/install.yml index 5c2bfa2af..24f5f354b 100644 --- a/roles/kalite/tasks/install.yml +++ b/roles/kalite/tasks/install.yml @@ -23,13 +23,6 @@ #extra_args="--disable-pip-version-check" when: internet_available | bool -# This effectively does nothing at all on Ubuntu & Raspbian, where libgeos-* -# pkgs are not installed FWIW. But it's included to safeguard us across all -# OS's, in case others OS's like Ubermix later appear. See #1382 for details. -# Removing pkgs libgeos-3.6.2 & libgeos-c1v5 fixed the situation on Ubermix! -- name: Remove libgeos-* pkgs, avoiding KA Lite Django failure on Ubermix - shell: apt -y remove "libgeos-*" - - name: "Install from template: venv wrapper /usr/bin/kalite, systemd unit file kalite-serve.service, Apache's kalite.conf" template: backup: no From 89c0bc9d8d8469f07d63404d05e27ea53ac4886b Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Thu, 19 Mar 2020 05:45:26 -0500 Subject: [PATCH 26/34] install python2 for kalite --- roles/kalite/tasks/install.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/kalite/tasks/install.yml b/roles/kalite/tasks/install.yml index 24f5f354b..e77432620 100644 --- a/roles/kalite/tasks/install.yml +++ b/roles/kalite/tasks/install.yml @@ -11,6 +11,11 @@ # ignore_errors: yes # when: is_raspbian | bool +- name: Install python2 + package: + name: python2 + state: present + - name: Use pip to install KA Lite static to {{ kalite_venv }} pip: name: ka-lite-static From 57ba7623451282d046786fcfbff1333b5e98fccf Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Thu, 19 Mar 2020 05:56:38 -0500 Subject: [PATCH 27/34] nextcloud - use {{ php_version }} --- roles/nextcloud/tasks/install.yml | 56 +++++++++++++++---------------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/roles/nextcloud/tasks/install.yml b/roles/nextcloud/tasks/install.yml index 69916b0d4..7fa429d56 100644 --- a/roles/nextcloud/tasks/install.yml +++ b/roles/nextcloud/tasks/install.yml @@ -48,44 +48,42 @@ - ffmpeg # Optional (for preview generation) - libxml2 # php-libxml requires libxml2 >= 2.7.0 #- libapache2-mod-php # 2020-02-15: NO LONGER NEEDED? - - php-bz2 # Optional (for extraction of apps) - #- php-cli # NOT REQUESTED by Nextcloud - #- php-common # NOT REQUESTED by Nextcloud - - php-curl - - php-fpm # ALSO INSTALLED IN roles/www_options (Stage 4) for nginx_high_php_limits - - php-gd - - php-gmp # Optional (for SFTP storage) - - php-imagick # Optional (for preview generation) - - php-intl # Optional (increases language translation performance and fixes sorting of non-ASCII characters) - - php-json + - php{{ php_version }}-bz2 # Optional (for extraction of apps) + - php{{ php_version }}-cli + - php{{ php_version }}-curl + - php{{ php_version }}-gd + - php{{ php_version }}-gmp # Optional (for SFTP storage) + - php{{ php_version }}-imagick # Optional (for preview generation) + - php{{ php_version }}-intl # Optional (increases language translation performance and fixes sorting of non-ASCII characters) + - php{{ php_version }}-json #- php-libxml # NOT INSTALLABLE: ENABLED BY DEFAULT (https://www.php.net/manual/en/libxml.installation.php) - - php-mbstring - - php-mysql + - php{{ php_version }}-mbstring + - php{{ php_version }}-mysql #- php-openssl # NOT INSTALLABLE: ENABLED BY DEFAULT? #- php-pdo_mysql # NOT INSTALLABLE: php-mysql handles this on all OS's? #- php-redis # @m-anish future work? #- php-session # NOT INSTALLABLE: ENABLED BY DEFAULT? - - php-smbclient # Optional (SMB/CIFS integration - - php-xml # NOT FORMALLY REQUESTED by Nextcloud (BUT hopefully delivers php-simplexml if not {php-xmlreader, php-xmlwriter} on Raspbian?) - - php-zip +# - php-smbclient # Optional (SMB/CIFS integration + - php{{ php_version }}-xml # NOT FORMALLY REQUESTED by Nextcloud (BUT hopefully delivers php-simplexml if not {php-xmlreader, php-xmlwriter} on Raspbian?) + - php{{ php_version }}-zip #- php-zlib # NOT INSTALLABLE: ENABLED BY DEFAULT? state: present # https://docs.nextcloud.com/server/18/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation -- name: Install 9 additional php packages, if OS is not Raspbian (these are not available on Raspbian on RPi, as of Feb 2020) - package: - name: - - php-ctype - - php-dom - - php-exif # Optional (for image rotation in pictures app) - - php-fileinfo # Optional (enhances file analysis performance) - - php-iconv - - php-posix - - php-simplexml - - php-xmlreader - - php-xmlwriter - state: present - when: not is_raspbian +#- name: Install 9 additional php packages, if OS is not Raspbian (these are not available on Raspbian on RPi, as of Feb 2020) +# package: +# name: +# - php-ctype +# - php-dom +# - php-exif # Optional (for image rotation in pictures app) +# - php-fileinfo # Optional (enhances file analysis performance) +# - php-iconv +# - php-posix +# - php-simplexml +# - php-xmlreader +# - php-xmlwriter +# state: present +# when: not is_raspbian - name: Create dir {{ nextcloud_root_dir }} From 0ca3bac42790de31f3530c2369b83814c9a93388 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Thu, 19 Mar 2020 05:57:49 -0500 Subject: [PATCH 28/34] better feedback --- roles/0-init/tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/0-init/tasks/main.yml b/roles/0-init/tasks/main.yml index 6e546a6f8..f768d3b3f 100644 --- a/roles/0-init/tasks/main.yml +++ b/roles/0-init/tasks/main.yml @@ -69,10 +69,9 @@ # Discover: do we have a gateway? # If Ansible detects gateway, becomes WAN candidate. -- name: "Do we have a gateway? If so set discovered_wan_iface: {{ ansible_default_ipv4.alias }}, iiab_wan_iface: {{ discovered_wan_iface }}" +- name: "Do we have a gateway? If so set discovered_wan_iface: {{ ansible_default_ipv4.alias }}" set_fact: discovered_wan_iface: "{{ ansible_default_ipv4.alias }}" - iiab_wan_iface: "{{ discovered_wan_iface }}" when: ansible_default_ipv4.gateway is defined - name: "Verify gateway active: ping -c4 {{ ansible_default_ipv4.gateway }}" @@ -80,12 +79,13 @@ when: discovered_wan_iface != "none" register: gw_active_test -- name: If so, set gw_active +- name: If so, set gw_active, iiab_wan_iface to {{ discovered_wan_iface }} set_fact: + iiab_wan_iface: "{{ discovered_wan_iface }}" gw_active: True when: discovered_wan_iface != "none" and gw_active_test.stdout == "1" -- name: Test for Internet access ({{ iiab_download_url }}/heart-beat.txt) +- name: Test with {{ iiab_wan_iface }} for Internet access ({{ iiab_download_url }}/heart-beat.txt) get_url: url: "{{ iiab_download_url }}/heart-beat.txt" dest: /tmp/heart-beat.txt From 17c69eca7400ea969e3f44b681d79717e8514c83 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Thu, 19 Mar 2020 05:59:21 -0500 Subject: [PATCH 29/34] network exclude ap0 --- roles/network/tasks/computed_network.yml | 18 +++++++++--------- roles/network/tasks/detected_network.yml | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/roles/network/tasks/computed_network.yml b/roles/network/tasks/computed_network.yml index e297986e8..fb27dc7b5 100644 --- a/roles/network/tasks/computed_network.yml +++ b/roles/network/tasks/computed_network.yml @@ -109,13 +109,13 @@ # make it so number 2 vars should use user_wan_iface but we can cover a single # wired if dhcp fails the interface should revert to LAN, static address should # stick around but testing gateway response is not performed. -- name: User wants single wired interface as static or dhcp gateway - set_fact: - user_wan_iface: "{{ discovered_wan_iface }}" # Jan 2018: Holt discovered_lan_iface was UNDEFINED on WiFi-installed - # RPi (when re-running ./iiab-network) so "discovered_wan_iface" is a - # workaround -- please see https://github.com/iiab/iiab/pull/649 - # This workaround can and should evolve as IIAB 6.5 matures! - when: num_lan_interfaces == "1" and user_lan_iface == "auto" and user_wan_iface == "auto" +#- name: User wants single wired interface as static or dhcp gateway +# set_fact: +# user_wan_iface: "{{ discovered_wan_iface }}" # Jan 2018: Holt discovered_lan_iface was UNDEFINED on WiFi-installed +# # RPi (when re-running ./iiab-network) so "discovered_wan_iface" is a +# # workaround -- please see https://github.com/iiab/iiab/pull/649 +# # This workaround can and should evolve as IIAB 6.5 matures! +# when: num_lan_interfaces == "1" and user_lan_iface == "auto" and user_wan_iface == "auto" - name: Use old gateway device info if not detected and using static ip set_fact: @@ -152,14 +152,14 @@ - name: We're hosed no work interfaces set_fact: iiab_network_mode: "No_network_found" - when: adapter_count.stdout|int == "0" + when: adapter_count.stdout|int == 0 # well if there ever was a point to tell the user things are FUBAR this is it. - name: I'm not guessing declare gateway please set_fact: iiab_network_mode: "Undetectable_use_local_vars" iiab_wan_iface: "none" - when: adapter_count.stdout|int >= "5" and device_gw == "none" and gui_wan_iface == "unset" and gui_static_wan is defined + when: adapter_count.stdout|int >= 5 and device_gw == "none" and gui_wan_iface == "unset" and gui_static_wan is defined - name: Record IIAB_WAN_DEVICE to {{ iiab_env_file }} lineinfile: diff --git a/roles/network/tasks/detected_network.yml b/roles/network/tasks/detected_network.yml index 66d4dcbb3..25f71d48d 100644 --- a/roles/network/tasks/detected_network.yml +++ b/roles/network/tasks/detected_network.yml @@ -75,7 +75,7 @@ set_fact: wifi2: "{{ item|trim }}" discovered_wireless_iface: "{{ item|trim }}" - when: wireless_list2.stdout is defined + when: wireless_list2.stdout is defined and not wireless_list2.stdout == "ap0" with_items: - "{{ wireless_list2.stdout_lines }}" #item|trim != discovered_wan_iface @@ -103,7 +103,7 @@ when: reserved_wifi is defined and discovered_wireless_iface != iiab_wan_iface and num_wifi_interfaces >= "2" - name: Count LAN ifaces - shell: ls /sys/class/net | grep -v -e wwlan -e ppp -e lo -e br0 -e tun -e br- -e docker -e bridge0 -e veth -e {{ device_gw }} -e {{ ap_device }} | wc -l + shell: ls /sys/class/net | grep -v -e ap0 -e wwlan -e ppp -e lo -e br0 -e tun -e br- -e docker -e bridge0 -e veth -e {{ device_gw }} -e {{ ap_device }} | wc -l register: num_lan_interfaces_result - name: Calculate number of LAN interfaces including WiFi @@ -112,7 +112,7 @@ # LAN - pick non WAN's - name: Create list of LAN (non WAN) ifaces - shell: ls /sys/class/net | grep -v -e wwlan -e ppp -e lo -e br0 -e tun -e br- -e docker -e bridge0 -e veth -e {{ device_gw }} -e {{ ap_device }} + shell: ls /sys/class/net | grep -v -e ap0 -e wwlan -e ppp -e lo -e br0 -e tun -e br- -e docker -e bridge0 -e veth -e {{ device_gw }} -e {{ ap_device }} when: num_lan_interfaces != "0" register: lan_list_result From c6939a495951f49a0f2c93c26e285a565d41ac23 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 19 Mar 2020 12:01:38 -0400 Subject: [PATCH 30/34] Clarify removal of libgeos-* pkgs for KA Lite on Ubermix --- 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 4cdefaa66..d540badca 100644 --- a/roles/1-prep/tasks/main.yml +++ b/roles/1-prep/tasks/main.yml @@ -62,6 +62,7 @@ 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-* # pkgs are not installed FWIW. But it's included to safeguard us across all # OS's, in case others OS's like Ubermix later appear. See #1382 for details. From ec8cd810f59b642e96b7b65bd1ed78f2856a0fd9 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 19 Mar 2020 12:12:17 -0400 Subject: [PATCH 31/34] Clarify PHP deps & options in nextcloud/tasks/install.yml --- roles/nextcloud/tasks/install.yml | 50 +++++++++++++++---------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/roles/nextcloud/tasks/install.yml b/roles/nextcloud/tasks/install.yml index 7fa429d56..9f6fb0dd6 100644 --- a/roles/nextcloud/tasks/install.yml +++ b/roles/nextcloud/tasks/install.yml @@ -44,44 +44,44 @@ - name: Install ffmpeg + libxml2 + 13 php packages package: name: - #- dnsutils # NOT REQUESTED by Nextcloud - - ffmpeg # Optional (for preview generation) - - libxml2 # php-libxml requires libxml2 >= 2.7.0 + #- dnsutils # NOT REQUESTED by Nextcloud + - 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 }}-bz2 # Optional (for extraction of apps) - - php{{ php_version }}-cli + - 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 }}-curl - php{{ php_version }}-gd - - php{{ php_version }}-gmp # Optional (for SFTP storage) - - php{{ php_version }}-imagick # Optional (for preview generation) - - php{{ php_version }}-intl # Optional (increases language translation performance and fixes sorting of non-ASCII characters) + - php{{ php_version }}-gmp # Optional (for SFTP storage) + - php{{ php_version }}-imagick # Optional (for preview generation) + - php{{ php_version }}-intl # Optional (increases language translation performance and fixes sorting of non-ASCII characters) - php{{ php_version }}-json - #- php-libxml # NOT INSTALLABLE: ENABLED BY DEFAULT (https://www.php.net/manual/en/libxml.installation.php) + #- php{{ php_version }}-libxml # NOT INSTALLABLE: ENABLED BY DEFAULT (https://www.php.net/manual/en/libxml.installation.php) - php{{ php_version }}-mbstring - php{{ php_version }}-mysql - #- php-openssl # NOT INSTALLABLE: ENABLED BY DEFAULT? - #- php-pdo_mysql # NOT INSTALLABLE: php-mysql handles this on all OS's? - #- php-redis # @m-anish future work? - #- php-session # NOT INSTALLABLE: ENABLED BY DEFAULT? -# - php-smbclient # Optional (SMB/CIFS integration - - php{{ php_version }}-xml # NOT FORMALLY REQUESTED by Nextcloud (BUT hopefully delivers php-simplexml if not {php-xmlreader, php-xmlwriter} on Raspbian?) + #- php{{ php_version }}-openssl # NOT INSTALLABLE: ENABLED BY DEFAULT? + #- php{{ php_version }}-pdo_mysql # NOT INSTALLABLE: php-mysql handles this on all OS's? + #- php{{ php_version }}-redis # @m-anish future work? + #- php{{ php_version }}-session # NOT INSTALLABLE: ENABLED BY DEFAULT? + #- php{{ php_version }}-smbclient # Optional (SMB/CIFS integration) + - php{{ php_version }}-xml # NOT FORMALLY REQUESTED by Nextcloud (BUT hopefully delivers php-simplexml if not {php-xmlreader, php-xmlwriter} on Raspbian?) - php{{ php_version }}-zip - #- php-zlib # NOT INSTALLABLE: ENABLED BY DEFAULT? + #- php{{ php_version }}-zlib # NOT INSTALLABLE: ENABLED BY DEFAULT? state: present # https://docs.nextcloud.com/server/18/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation #- name: Install 9 additional php packages, if OS is not Raspbian (these are not available on Raspbian on RPi, as of Feb 2020) # package: # name: -# - php-ctype -# - php-dom -# - php-exif # Optional (for image rotation in pictures app) -# - php-fileinfo # Optional (enhances file analysis performance) -# - php-iconv -# - php-posix -# - php-simplexml -# - php-xmlreader -# - php-xmlwriter +# - php{{ php_version }}-ctype +# - php{{ php_version }}-dom +# - php{{ php_version }}-exif # Optional (for image rotation in pictures app) +# - php{{ php_version }}-fileinfo # Optional (enhances file analysis performance) +# - php{{ php_version }}-iconv +# - php{{ php_version }}-posix +# - php{{ php_version }}-simplexml +# - php{{ php_version }}-xmlreader +# - php{{ php_version }}-xmlwriter # state: present # when: not is_raspbian From 9f8646a33a5695e0b4fc91ae2561a7f18692ed99 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 19 Mar 2020 14:54:21 -0400 Subject: [PATCH 32/34] Clarify: 12 (not 13) php pkgs for Nextcloud --- 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 9f6fb0dd6..9ccaf8565 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 + 13 php packages +- name: Install ffmpeg + libxml2 + 12 php packages package: name: #- dnsutils # NOT REQUESTED by Nextcloud From 3a4cd6a7c7f2c1a73b0f9571562341c1ae24cdac Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 19 Mar 2020 17:28:45 -0400 Subject: [PATCH 33/34] Clarify installation of 4 packages: dphys-swapfile, fake-hwclock, iw, rfkill --- roles/1-prep/tasks/raspberry_pi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/1-prep/tasks/raspberry_pi.yml b/roles/1-prep/tasks/raspberry_pi.yml index 792feae96..8b7e7b233 100644 --- a/roles/1-prep/tasks/raspberry_pi.yml +++ b/roles/1-prep/tasks/raspberry_pi.yml @@ -31,7 +31,7 @@ line: 'include btcfg.txt' when: is_ubuntu -- name: Ensure dphys-swapfile fake-hwclock iw rkill are installed +- name: 'Ensure packages are installed: dphys-swapfile, fake-hwclock, iw, rfkill' package: name: - dphys-swapfile From ea9d4e9df57f0b90a8c71daa89b6203a57dc1c8b Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 19 Mar 2020 17:32:11 -0400 Subject: [PATCH 34/34] Clean/fix Ansible comments i.e. debuntu no longer applicable --- roles/1-prep/tasks/raspberry_pi.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/1-prep/tasks/raspberry_pi.yml b/roles/1-prep/tasks/raspberry_pi.yml index 8b7e7b233..8387eb300 100644 --- a/roles/1-prep/tasks/raspberry_pi.yml +++ b/roles/1-prep/tasks/raspberry_pi.yml @@ -40,13 +40,13 @@ - rfkill state: present -- name: Increase swap file size (to CONF_SWAPSIZE={{ pi_swap_file_size }} in /etc/dphys-swapfile) as kalite pip download fails (debuntu) +- name: Increase swap file size (to CONF_SWAPSIZE={{ pi_swap_file_size }} in /etc/dphys-swapfile) as kalite pip download fails lineinfile: path: /etc/dphys-swapfile regexp: "^CONF_SWAPSIZE" line: "CONF_SWAPSIZE={{ pi_swap_file_size }}" -- name: Restart swap service "dphys-swapfile" (debuntu) +- name: Restart swap service "dphys-swapfile" #command: /etc/init.d/dphys-swapfile restart service: # A rare/legacy service that is NOT systemd name: dphys-swapfile