From 50b7888029ce4c57863453dab0b091802e939350 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 28 Jul 2021 15:09:56 -0400 Subject: [PATCH 01/18] kalite/tasks/install.yml: package 'virtualenv' for Python 2 --- roles/kalite/tasks/install.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/kalite/tasks/install.yml b/roles/kalite/tasks/install.yml index ab6a923a8..11e4dd063 100644 --- a/roles/kalite/tasks/install.yml +++ b/roles/kalite/tasks/install.yml @@ -15,7 +15,8 @@ package: name: - python2 - - python-setuptools # provides setuptools-44 last version compatible with python2 + - python-setuptools # Provides setuptools-44 (last version compatible with python2) + - virtualenv # Provides venv for python2 -- compare python3-venv in scripts/ansible 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. From a6acf8261c35730053aa2838edca2ac872f8b17d Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 28 Jul 2021 15:13:32 -0400 Subject: [PATCH 02/18] scripts/ansible: Remove package 'virtualenv' --- scripts/ansible | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ansible b/scripts/ansible index b76c888ed..e6c64fc0e 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -155,7 +155,7 @@ $APT_PATH/apt update #$APT_PATH/apt -y --allow-downgrades install ansible-core \ $APT_PATH/apt -y install \ python3-pymysql python3-psycopg2 python3-passlib python3-pip \ - python3-setuptools python3-packaging python3-venv virtualenv + python3-setuptools python3-packaging python3-venv # 'virtualenv' for Python 2 moved to kalite/tasks/install.yml echo -e "\n\n'pip3 install --upgrade ansible-core' will now run:\n" pip3 install --upgrade ansible-core From e88c5df3df59f6da0ddf02cc69d73fb69b57e936 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 28 Jul 2021 19:10:22 -0400 Subject: [PATCH 03/18] mv 3 python3-* pkgs FROM scripts/ansible TO roles {mysql, postsgresql, munin} --- roles/munin/tasks/install.yml | 3 ++- roles/mysql/tasks/install.yml | 1 + roles/postgresql/tasks/install.yml | 1 + scripts/ansible | 19 ++++++++++++++----- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/roles/munin/tasks/install.yml b/roles/munin/tasks/install.yml index 0e7af8fe4..6cbf5a934 100644 --- a/roles/munin/tasks/install.yml +++ b/roles/munin/tasks/install.yml @@ -1,4 +1,4 @@ -- name: "Install 4 packages: munin, munin-node, munin-plugins-extra, libcgi-fast-perl" +- name: "Install 5 packages: munin, munin-node, munin-plugins-extra, libcgi-fast-perl, python3-passlib" package: name: - munin @@ -6,6 +6,7 @@ - munin-plugins-extra - libcgi-fast-perl #- libapache2-mod-fcgid + - python3-passlib state: present - name: Establish username/password Admin/changeme in /etc/munin/munin-htpasswd diff --git a/roles/mysql/tasks/install.yml b/roles/mysql/tasks/install.yml index 30ed53f54..1b20a08cc 100644 --- a/roles/mysql/tasks/install.yml +++ b/roles/mysql/tasks/install.yml @@ -12,6 +12,7 @@ - mariadb-client #- php{{ php_version }}-common # Auto-installed as an apt dependency. REGARDLESS: php{{ php_version }}-common superset php{{ php_version }}-cli is auto-installed by php{{ php_version }}-fpm in nginx/tasks/install.yml - php{{ php_version }}-mysql # Likewise installed in nextcloud/tasks/install.yml, pbx/tasks/freepbx_dependencies.yml, wordpress/tasks/install.yml + - python3-pymysql # Required by MySQL roles like Elgg, MediaWiki etc state: present # 2020-07-11: diff --git a/roles/postgresql/tasks/install.yml b/roles/postgresql/tasks/install.yml index bc180c234..a22288b31 100644 --- a/roles/postgresql/tasks/install.yml +++ b/roles/postgresql/tasks/install.yml @@ -3,6 +3,7 @@ name: - postgresql - postgresql-client + - python3-psycopg2 # Moodle install fails without this state: present - name: Install /etc/systemd/system/postgresql-iiab.service from template (0644 by default) diff --git a/scripts/ansible b/scripts/ansible index e6c64fc0e..0128976f2 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -149,13 +149,22 @@ fi ###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 "\napt update; apt install of python3-* / virtualenv packages explained at:" -echo -e "https://github.com/iiab/iiab/blob/master/scripts/ansible.md\n" +echo -e "\napt update; apt install python3-pip # Also installs 'python3-setuptools'" +#echo -e "https://github.com/iiab/iiab/blob/master/scripts/ansible.md\n" $APT_PATH/apt update +$APT_PATH/apt -y install python3-pip + +# 2021-07-28: +# 'python3-pymysql' (drags in 'python3' which drags in 'python3-venv') moved to roles/mysql/tasks/install.yml +# 'python3-psycopg2' moved to roles/postgresql/tasks/install.yml +# 'python3-passlib' moved to roles/munin/tasks/install.yml +# 'virtualenv' for Python 2 moved to roles/kalite/tasks/install.yml +# +#$APT_PATH/apt -y install \ +# python3-pymysql python3-psycopg2 python3-passlib python3-pip \ +# python3-setuptools python3-packaging python3-venv + #$APT_PATH/apt -y --allow-downgrades install ansible-core \ -$APT_PATH/apt -y install \ - python3-pymysql python3-psycopg2 python3-passlib python3-pip \ - python3-setuptools python3-packaging python3-venv # 'virtualenv' for Python 2 moved to kalite/tasks/install.yml echo -e "\n\n'pip3 install --upgrade ansible-core' will now run:\n" pip3 install --upgrade ansible-core From c918f33f1918d5100f0c2650fc19a3631afbadea Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 29 Jul 2021 07:54:35 -0400 Subject: [PATCH 04/18] jupyterhub/tasks/install.yml: Try full Python 3 venv --- roles/jupyterhub/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/jupyterhub/tasks/install.yml b/roles/jupyterhub/tasks/install.yml index f33d05191..174edcb48 100644 --- a/roles/jupyterhub/tasks/install.yml +++ b/roles/jupyterhub/tasks/install.yml @@ -40,7 +40,7 @@ - jupyterhub-systemdspawner virtualenv: "{{ jupyterhub_venv }}" # /opt/iiab/jupyterhub virtualenv_site_packages: no - virtualenv_command: /usr/bin/virtualenv + virtualenv_command: python3 -m venv "{{ jupyterhub_venv }}" virtualenv_python: python3 extra_args: "--no-cache-dir" when: internet_available From bb61e39c80ab498f96bc8e6e59dabd21430af037 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 29 Jul 2021 07:59:37 -0400 Subject: [PATCH 05/18] Rename ansible.md to ansible.md.unused --- scripts/{ansible.md => ansible.md.unused} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename scripts/{ansible.md => ansible.md.unused} (100%) diff --git a/scripts/ansible.md b/scripts/ansible.md.unused similarity index 100% rename from scripts/ansible.md rename to scripts/ansible.md.unused From c98e03de7b7f315b54872dd2ec360ed6d1dd45a0 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 29 Jul 2021 09:28:43 -0400 Subject: [PATCH 06/18] 2-common/tasks/packages.yml: python3-venv for U20.04 {calibre-web, jupyterhub, lokole} --- roles/2-common/tasks/packages.yml | 3 ++- roles/jupyterhub/tasks/install.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/2-common/tasks/packages.yml b/roles/2-common/tasks/packages.yml index 3362c0ce5..4d4905e47 100644 --- a/roles/2-common/tasks/packages.yml +++ b/roles/2-common/tasks/packages.yml @@ -4,7 +4,7 @@ - name: '2021-07-27: SEE ALSO 4-5 networking packages LATER installed by https://github.com/iiab/iiab/blob/master/roles/2-common/tasks/network.yml' meta: noop -- name: "Install 20 common packages: acpid, avahi-daemon, bzip2, curl, gawk, htop, i2c-tools, libnss-mdns, logrotate, mlocate, net-tools, pandoc, pastebinit, rsync, sqlite3, tar, unzip, usbutils, wget, wpasupplicant" +- name: "Install 21 common packages: acpid, avahi-daemon, bzip2, curl, gawk, htop, i2c-tools, libnss-mdns, logrotate, mlocate, net-tools, pandoc, pastebinit, python3-venv, rsync, sqlite3, tar, unzip, usbutils, wget, wpasupplicant" package: name: - acpid # Daemon for ACPI (power mgmt) events @@ -30,6 +30,7 @@ #- openssh-server # ssh (Raspbian) or openssh-server (other OS's) already installed by 1-prep's roles/sshd/tasks/main.yml - pandoc # For /usr/bin/iiab-refresh-wiki-docs - pastebinit # For /usr/bin/iiab-diagnostics + - python3-venv # 2021-07-29: Unlike Debian 11, this is required on Ubuntu 20.04 (where packages like python3-pymysql -> python3 don't drag in 'python3-venv') -- for roles like {calibre-web, jupyterhub, lokole} -- whereas roles/kalite uses (virtual) package 'virtualenv' for Python 2 - rsync #- screen # Installed by 1-prep's roles/iiab-admin/tasks/access.yml - sqlite3 diff --git a/roles/jupyterhub/tasks/install.yml b/roles/jupyterhub/tasks/install.yml index 174edcb48..03a7f037d 100644 --- a/roles/jupyterhub/tasks/install.yml +++ b/roles/jupyterhub/tasks/install.yml @@ -41,7 +41,7 @@ virtualenv: "{{ jupyterhub_venv }}" # /opt/iiab/jupyterhub virtualenv_site_packages: no virtualenv_command: python3 -m venv "{{ jupyterhub_venv }}" - virtualenv_python: python3 + #virtualenv_python: python3 # 2021-07-29: Was needed when above line was 'virtualenv_command: virtualenv' (generally for Python 2) extra_args: "--no-cache-dir" when: internet_available From 2b8301bbec17c51568d723222b496e2ee6c0ca14 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 29 Jul 2021 10:01:22 -0400 Subject: [PATCH 07/18] Clarify scripts/ansible & 2-common/tasks/packages.yml --- roles/2-common/tasks/packages.yml | 1 + scripts/ansible | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/roles/2-common/tasks/packages.yml b/roles/2-common/tasks/packages.yml index 4d4905e47..36b61b943 100644 --- a/roles/2-common/tasks/packages.yml +++ b/roles/2-common/tasks/packages.yml @@ -30,6 +30,7 @@ #- openssh-server # ssh (Raspbian) or openssh-server (other OS's) already installed by 1-prep's roles/sshd/tasks/main.yml - pandoc # For /usr/bin/iiab-refresh-wiki-docs - pastebinit # For /usr/bin/iiab-diagnostics + #- python3-pip # Already installed by /opt/iiab/iiab/scripts/ansible -- this auto-installs 'python3-setuptools' and 'python3' etc - python3-venv # 2021-07-29: Unlike Debian 11, this is required on Ubuntu 20.04 (where packages like python3-pymysql -> python3 don't drag in 'python3-venv') -- for roles like {calibre-web, jupyterhub, lokole} -- whereas roles/kalite uses (virtual) package 'virtualenv' for Python 2 - rsync #- screen # Installed by 1-prep's roles/iiab-admin/tasks/access.yml diff --git a/scripts/ansible b/scripts/ansible index 0128976f2..c7755bf21 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -149,15 +149,17 @@ fi ###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 "\napt update; apt install python3-pip # Also installs 'python3-setuptools'" +echo -e "\napt update; apt install python3-pip # Also installs 'python3-setuptools' and 'python3' etc" #echo -e "https://github.com/iiab/iiab/blob/master/scripts/ansible.md\n" $APT_PATH/apt update $APT_PATH/apt -y install python3-pip -# 2021-07-28: -# 'python3-pymysql' (drags in 'python3' which drags in 'python3-venv') moved to roles/mysql/tasks/install.yml +# 2021-07-29: +# 'python3-packaging' dropped for now +# 'python3-pymysql' (drags in 'python3' which drags in 'python3-venv' on Debian 11 but not on Ubuntu 20.04) moved to roles/mysql/tasks/install.yml # 'python3-psycopg2' moved to roles/postgresql/tasks/install.yml # 'python3-passlib' moved to roles/munin/tasks/install.yml +# 'python3-venv' move to roles/2-common/tasks/packages.yml # 'virtualenv' for Python 2 moved to roles/kalite/tasks/install.yml # #$APT_PATH/apt -y install \ From c5a3c615ccc6797b604a6a8da2d6731c388a745d Mon Sep 17 00:00:00 2001 From: root Date: Thu, 29 Jul 2021 10:07:22 -0400 Subject: [PATCH 08/18] scripts/ansible: Fix typo in comment --- scripts/ansible | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ansible b/scripts/ansible index c7755bf21..a9577ebc0 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -159,7 +159,7 @@ $APT_PATH/apt -y install python3-pip # 'python3-pymysql' (drags in 'python3' which drags in 'python3-venv' on Debian 11 but not on Ubuntu 20.04) moved to roles/mysql/tasks/install.yml # 'python3-psycopg2' moved to roles/postgresql/tasks/install.yml # 'python3-passlib' moved to roles/munin/tasks/install.yml -# 'python3-venv' move to roles/2-common/tasks/packages.yml +# 'python3-venv' moved to roles/2-common/tasks/packages.yml # 'virtualenv' for Python 2 moved to roles/kalite/tasks/install.yml # #$APT_PATH/apt -y install \ From 8b89c7eb91616371511050b20d3daf4edfabf968 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 29 Jul 2021 10:23:23 -0400 Subject: [PATCH 09/18] munin/tasks/install.yml: package ordering (no functional change) --- roles/munin/tasks/install.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/munin/tasks/install.yml b/roles/munin/tasks/install.yml index 6cbf5a934..9473a08d4 100644 --- a/roles/munin/tasks/install.yml +++ b/roles/munin/tasks/install.yml @@ -1,11 +1,11 @@ -- name: "Install 5 packages: munin, munin-node, munin-plugins-extra, libcgi-fast-perl, python3-passlib" +- name: "Install 5 packages: libcgi-fast-perl, munin, munin-node, munin-plugins-extra, python3-passlib" package: name: + #- libapache2-mod-fcgid + - libcgi-fast-perl - munin - munin-node - munin-plugins-extra - - libcgi-fast-perl - #- libapache2-mod-fcgid - python3-passlib state: present From 68e59156145d66cbf8ae7b2d669c25e9ffab1a05 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 29 Jul 2021 10:30:43 -0400 Subject: [PATCH 10/18] Explain 'python3-pymysql' in roles/mysql/tasks/install.yml --- roles/mysql/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mysql/tasks/install.yml b/roles/mysql/tasks/install.yml index 1b20a08cc..bf893ae54 100644 --- a/roles/mysql/tasks/install.yml +++ b/roles/mysql/tasks/install.yml @@ -12,7 +12,7 @@ - mariadb-client #- php{{ php_version }}-common # Auto-installed as an apt dependency. REGARDLESS: php{{ php_version }}-common superset php{{ php_version }}-cli is auto-installed by php{{ php_version }}-fpm in nginx/tasks/install.yml - php{{ php_version }}-mysql # Likewise installed in nextcloud/tasks/install.yml, pbx/tasks/freepbx_dependencies.yml, wordpress/tasks/install.yml - - python3-pymysql # Required by MySQL roles like Elgg, MediaWiki etc + - python3-pymysql # 2021-07-29: Required by MySQL roles {mediawiki, nextcloud, wordpress} and possibly {elgg, pbx} state: present # 2020-07-11: From 7427a71d089fe6d251f9b84ae2d15087e037df54 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 29 Jul 2021 11:37:07 -0400 Subject: [PATCH 11/18] kalite/tasks/install.yml: Mandate virtualenv (for Python 2) --- roles/kalite/tasks/install.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/kalite/tasks/install.yml b/roles/kalite/tasks/install.yml index 11e4dd063..132c27022 100644 --- a/roles/kalite/tasks/install.yml +++ b/roles/kalite/tasks/install.yml @@ -11,14 +11,14 @@ # ignore_errors: yes # when: is_raspbian -- name: Install python2, if Raspbian/Debian > 10 or Ubuntu > 19 +- name: 'Install packages: python2, python-setuptools, virtualenv (for Python 2)' # if Raspbian/Debian > 10 or Ubuntu > 19 package: name: - python2 - - python-setuptools # Provides setuptools-44 (last version compatible with python2) + - python-setuptools # Provides setuptools-44 on recent OS's (last version compatible with python2) - virtualenv # Provides venv for python2 -- compare python3-venv in scripts/ansible 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) + #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 From 7a6f854a3f389f9f010d12b52f9b3291b05d6c2e Mon Sep 17 00:00:00 2001 From: root Date: Thu, 29 Jul 2021 12:34:32 -0400 Subject: [PATCH 12/18] Explain Ansible modules used w/ 4+1 packages {python3-*, virtualenv} --- roles/2-common/tasks/packages.yml | 4 ++-- roles/kalite/tasks/install.yml | 2 +- roles/munin/tasks/install.yml | 2 +- roles/mysql/tasks/install.yml | 2 +- roles/postgresql/tasks/install.yml | 2 +- scripts/ansible | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/2-common/tasks/packages.yml b/roles/2-common/tasks/packages.yml index 36b61b943..64377c5b9 100644 --- a/roles/2-common/tasks/packages.yml +++ b/roles/2-common/tasks/packages.yml @@ -30,8 +30,8 @@ #- openssh-server # ssh (Raspbian) or openssh-server (other OS's) already installed by 1-prep's roles/sshd/tasks/main.yml - pandoc # For /usr/bin/iiab-refresh-wiki-docs - pastebinit # For /usr/bin/iiab-diagnostics - #- python3-pip # Already installed by /opt/iiab/iiab/scripts/ansible -- this auto-installs 'python3-setuptools' and 'python3' etc - - python3-venv # 2021-07-29: Unlike Debian 11, this is required on Ubuntu 20.04 (where packages like python3-pymysql -> python3 don't drag in 'python3-venv') -- for roles like {calibre-web, jupyterhub, lokole} -- whereas roles/kalite uses (virtual) package 'virtualenv' for Python 2 + #- python3-pip # 2021-07-29: Already installed by /opt/iiab/iiab/scripts/ansible -- this auto-installs 'python3-setuptools' and 'python3' etc + - python3-venv # 2021-07-29: Unlike Debian 11, this is required on Ubuntu 20.04 (where packages like python3-pymysql -> python3 don't drag in 'python3-venv') -- for Ansible module 'pip' used in roles like {calibre-web, jupyterhub, lokole} -- whereas roles/kalite uses it with (virtual) package 'virtualenv' for Python 2 - rsync #- screen # Installed by 1-prep's roles/iiab-admin/tasks/access.yml - sqlite3 diff --git a/roles/kalite/tasks/install.yml b/roles/kalite/tasks/install.yml index 132c27022..5aa3c1495 100644 --- a/roles/kalite/tasks/install.yml +++ b/roles/kalite/tasks/install.yml @@ -16,7 +16,7 @@ name: - python2 - python-setuptools # Provides setuptools-44 on recent OS's (last version compatible with python2) - - virtualenv # Provides venv for python2 -- compare python3-venv in scripts/ansible + - virtualenv # For Ansible module 'pip' when used with 'virtualenv_command: /usr/bin/virtualenv' and 'virtualenv_python: python2.7' -- compare package 'python3-venv' used by roles {calibre-web, jupyterhub, lokole} 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. diff --git a/roles/munin/tasks/install.yml b/roles/munin/tasks/install.yml index 9473a08d4..7d439ff5a 100644 --- a/roles/munin/tasks/install.yml +++ b/roles/munin/tasks/install.yml @@ -6,7 +6,7 @@ - munin - munin-node - munin-plugins-extra - - python3-passlib + - python3-passlib # For Ansible module 'htpasswd' in Ansible collection community.general -- used just below state: present - name: Establish username/password Admin/changeme in /etc/munin/munin-htpasswd diff --git a/roles/mysql/tasks/install.yml b/roles/mysql/tasks/install.yml index bf893ae54..86ca85db0 100644 --- a/roles/mysql/tasks/install.yml +++ b/roles/mysql/tasks/install.yml @@ -12,7 +12,7 @@ - mariadb-client #- php{{ php_version }}-common # Auto-installed as an apt dependency. REGARDLESS: php{{ php_version }}-common superset php{{ php_version }}-cli is auto-installed by php{{ php_version }}-fpm in nginx/tasks/install.yml - php{{ php_version }}-mysql # Likewise installed in nextcloud/tasks/install.yml, pbx/tasks/freepbx_dependencies.yml, wordpress/tasks/install.yml - - python3-pymysql # 2021-07-29: Required by MySQL roles {mediawiki, nextcloud, wordpress} and possibly {elgg, pbx} + - python3-pymysql # For Ansible modules {mysql_db, mysql_user available} in Ansible collection community.mysql -- used in MySQL roles {mediawiki, nextcloud, wordpress} and possibly {elgg, pbx} state: present # 2020-07-11: diff --git a/roles/postgresql/tasks/install.yml b/roles/postgresql/tasks/install.yml index a22288b31..3fa1a95d0 100644 --- a/roles/postgresql/tasks/install.yml +++ b/roles/postgresql/tasks/install.yml @@ -3,7 +3,7 @@ name: - postgresql - postgresql-client - - python3-psycopg2 # Moodle install fails without this + - python3-psycopg2 # For Ansible modules {postgresql_db, postgresql_user} in Ansible collection community.postgresql -- used in moodle/tasks/install.yml state: present - name: Install /etc/systemd/system/postgresql-iiab.service from template (0644 by default) diff --git a/scripts/ansible b/scripts/ansible index a9577ebc0..56896f90f 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -156,7 +156,7 @@ $APT_PATH/apt -y install python3-pip # 2021-07-29: # 'python3-packaging' dropped for now -# 'python3-pymysql' (drags in 'python3' which drags in 'python3-venv' on Debian 11 but not on Ubuntu 20.04) moved to roles/mysql/tasks/install.yml +# 'python3-pymysql' (drags in 'python3' which drags in 'python3-venv' on Debian 11 but not on Ubuntu 20.04) -- moved to roles/mysql/tasks/install.yml # 'python3-psycopg2' moved to roles/postgresql/tasks/install.yml # 'python3-passlib' moved to roles/munin/tasks/install.yml # 'python3-venv' moved to roles/2-common/tasks/packages.yml From cedef1a972d621efe9b636c81410fe617aef0a35 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 29 Jul 2021 12:40:50 -0400 Subject: [PATCH 13/18] mysql/tasks/install.yml: Fix typo in comment --- roles/mysql/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mysql/tasks/install.yml b/roles/mysql/tasks/install.yml index 86ca85db0..e5a4905f4 100644 --- a/roles/mysql/tasks/install.yml +++ b/roles/mysql/tasks/install.yml @@ -12,7 +12,7 @@ - mariadb-client #- php{{ php_version }}-common # Auto-installed as an apt dependency. REGARDLESS: php{{ php_version }}-common superset php{{ php_version }}-cli is auto-installed by php{{ php_version }}-fpm in nginx/tasks/install.yml - php{{ php_version }}-mysql # Likewise installed in nextcloud/tasks/install.yml, pbx/tasks/freepbx_dependencies.yml, wordpress/tasks/install.yml - - python3-pymysql # For Ansible modules {mysql_db, mysql_user available} in Ansible collection community.mysql -- used in MySQL roles {mediawiki, nextcloud, wordpress} and possibly {elgg, pbx} + - python3-pymysql # For Ansible modules {mysql_db, mysql_user} in Ansible collection community.mysql -- used in MySQL roles {mediawiki, nextcloud, wordpress} and possibly {elgg, pbx} state: present # 2020-07-11: From f28a7807516d994223f0423cf057fddb9cb090bd Mon Sep 17 00:00:00 2001 From: root Date: Thu, 29 Jul 2021 16:32:02 -0400 Subject: [PATCH 14/18] scripts/ansible: Update comments --- scripts/ansible | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index 56896f90f..bd14bc7b5 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -4,7 +4,6 @@ # 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 # https://github.com/iiab/iiab/wiki/IIAB-Contributors-Guide#ansible APT_PATH=/usr/bin # Avoids problematic /usr/local/bin/apt on Linux Mint @@ -164,7 +163,7 @@ $APT_PATH/apt -y install python3-pip # #$APT_PATH/apt -y install \ # python3-pymysql python3-psycopg2 python3-passlib python3-pip \ -# python3-setuptools python3-packaging python3-venv +# python3-setuptools python3-packaging python3-venv virtualenv #$APT_PATH/apt -y --allow-downgrades install ansible-core \ From e5737ee7ad874fa8191eea40c425360014935982 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 29 Jul 2021 17:04:54 -0400 Subject: [PATCH 15/18] jupyterhub/tasks/install.yml: Explain 'python3 -m venv' failure on Debian 10 --- roles/jupyterhub/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/jupyterhub/tasks/install.yml b/roles/jupyterhub/tasks/install.yml index 03a7f037d..171ed36ff 100644 --- a/roles/jupyterhub/tasks/install.yml +++ b/roles/jupyterhub/tasks/install.yml @@ -40,7 +40,7 @@ - jupyterhub-systemdspawner virtualenv: "{{ jupyterhub_venv }}" # /opt/iiab/jupyterhub virtualenv_site_packages: no - virtualenv_command: python3 -m venv "{{ jupyterhub_venv }}" + virtualenv_command: python3 -m venv "{{ jupyterhub_venv }}" # 2021-07-29: This work on RaspiOS 10, Debian 11, Ubuntu 20.04 and Mint 20 -- however if you absolutely must use the older Debian 10 -- you can work around errors "can't find Rust compiler" and "This package requires Rust >=1.41.0" if you (1) revert this line to 'virtualenv_command: virtualenv' AND (2) uncomment the line just below #virtualenv_python: python3 # 2021-07-29: Was needed when above line was 'virtualenv_command: virtualenv' (generally for Python 2) extra_args: "--no-cache-dir" when: internet_available From ea46dc32cad2abba4a9bf562b5ed73e2971afc10 Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 30 Jul 2021 09:57:31 -0400 Subject: [PATCH 16/18] jupyterhub/tasks/install.yml: Fix typo in comment --- roles/jupyterhub/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/jupyterhub/tasks/install.yml b/roles/jupyterhub/tasks/install.yml index 171ed36ff..e1a8525f4 100644 --- a/roles/jupyterhub/tasks/install.yml +++ b/roles/jupyterhub/tasks/install.yml @@ -40,7 +40,7 @@ - jupyterhub-systemdspawner virtualenv: "{{ jupyterhub_venv }}" # /opt/iiab/jupyterhub virtualenv_site_packages: no - virtualenv_command: python3 -m venv "{{ jupyterhub_venv }}" # 2021-07-29: This work on RaspiOS 10, Debian 11, Ubuntu 20.04 and Mint 20 -- however if you absolutely must use the older Debian 10 -- you can work around errors "can't find Rust compiler" and "This package requires Rust >=1.41.0" if you (1) revert this line to 'virtualenv_command: virtualenv' AND (2) uncomment the line just below + virtualenv_command: python3 -m venv "{{ jupyterhub_venv }}" # 2021-07-29: This works on RaspiOS 10, Debian 11, Ubuntu 20.04 and Mint 20 -- however if you absolutely must use the older Debian 10 -- you can work around errors "can't find Rust compiler" and "This package requires Rust >=1.41.0" if you (1) revert this line to 'virtualenv_command: virtualenv' AND (2) uncomment the line just below #virtualenv_python: python3 # 2021-07-29: Was needed when above line was 'virtualenv_command: virtualenv' (generally for Python 2) extra_args: "--no-cache-dir" when: internet_available From d39956496849a03bbebc4a54987c6e2e48c5ec47 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 2 Aug 2021 04:25:12 -0400 Subject: [PATCH 17/18] roles/jupyterhub/tasks/install.yml: install python3-venv --- roles/2-common/tasks/packages.yml | 2 +- roles/calibre-web/tasks/install.yml | 2 +- roles/jupyterhub/tasks/install.yml | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/roles/2-common/tasks/packages.yml b/roles/2-common/tasks/packages.yml index 64377c5b9..5e1018f33 100644 --- a/roles/2-common/tasks/packages.yml +++ b/roles/2-common/tasks/packages.yml @@ -31,7 +31,7 @@ - pandoc # For /usr/bin/iiab-refresh-wiki-docs - pastebinit # For /usr/bin/iiab-diagnostics #- python3-pip # 2021-07-29: Already installed by /opt/iiab/iiab/scripts/ansible -- this auto-installs 'python3-setuptools' and 'python3' etc - - python3-venv # 2021-07-29: Unlike Debian 11, this is required on Ubuntu 20.04 (where packages like python3-pymysql -> python3 don't drag in 'python3-venv') -- for Ansible module 'pip' used in roles like {calibre-web, jupyterhub, lokole} -- whereas roles/kalite uses it with (virtual) package 'virtualenv' for Python 2 + #- python3-venv # 2021-07-30: For Ansible module 'pip' used in roles like {calibre-web, jupyterhub, lokole} -- whereas roles/kalite uses (virtual) package 'virtualenv' for Python 2 -- all these 3+1 IIAB roles install 'python3-venv' for themselves. FYI: Debian 11 auto-installs 'python3-venv' when you install 'python3' -- whereas Ubuntu (e.g. 20.04 & 21.10) and RaspiOS 10 do not. - rsync #- screen # Installed by 1-prep's roles/iiab-admin/tasks/access.yml - sqlite3 diff --git a/roles/calibre-web/tasks/install.yml b/roles/calibre-web/tasks/install.yml index 7fc422397..0e8a88122 100644 --- a/roles/calibre-web/tasks/install.yml +++ b/roles/calibre-web/tasks/install.yml @@ -1,4 +1,4 @@ -- name: "Install ImageMagick package: imagemagick" +- name: "Install packages: imagemagick, python3-venv" package: name: - imagemagick diff --git a/roles/jupyterhub/tasks/install.yml b/roles/jupyterhub/tasks/install.yml index e1a8525f4..1f71ba454 100644 --- a/roles/jupyterhub/tasks/install.yml +++ b/roles/jupyterhub/tasks/install.yml @@ -13,6 +13,11 @@ when: nodejs_installed is undefined +- name: "Install package: python3-venv" + package: + name: python3-venv + state: present + - name: Make 3 directories to hold JupyterHub config file: state: directory From 59cfb6751a1e9f148176e31c10331aa1d13cf270 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Aug 2021 04:38:12 -0400 Subject: [PATCH 18/18] kalite/tasks/install.yml: Remove stale 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 5aa3c1495..390ea2719 100644 --- a/roles/kalite/tasks/install.yml +++ b/roles/kalite/tasks/install.yml @@ -11,7 +11,7 @@ # ignore_errors: yes # when: is_raspbian -- name: 'Install packages: python2, python-setuptools, virtualenv (for Python 2)' # if Raspbian/Debian > 10 or Ubuntu > 19 +- name: 'Install packages: python2, python-setuptools, virtualenv (for Python 2)' package: name: - python2