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 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. 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 b76c888ed..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 echo -e "\n\n'pip3 install --upgrade ansible-core' will now run:\n" pip3 install --upgrade ansible-core 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