1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

pip install {pymysql,psycopg,passlib} to Ansible venv, on demand

This commit is contained in:
root 2025-02-17 01:59:15 -05:00
parent f16bd2a6b5
commit 957a89d67c
3 changed files with 24 additions and 6 deletions

View file

@ -3,14 +3,20 @@
register: df1
- name: 'Install packages: postgresql, postgresql-client, python3-psycopg2'
- name: 'Install packages: postgresql, postgresql-client'
package:
name:
- postgresql
- postgresql-client
- python3-psycopg2 # For Ansible modules {postgresql_db, postgresql_user} in Ansible collection community.postgresql -- used in moodle/tasks/install.yml
#- python3-psycopg2 # For Ansible modules {postgresql_db, postgresql_user} in Ansible collection community.postgresql -- used in moodle/tasks/install.yml
state: present
- name: pip install 'psycopg' into venv /usr/local/ansible -- for Ansible modules {postgresql_db, postgresql_user} in Ansible collection community.postgresql -- used in moodle/tasks/install.yml
pip:
name: psycopg
virtualenv: /usr/local/ansible
extra_args: "--upgrade --no-cache-dir --prefer-binary" # 2023-10-01: Lifesaver when recent wheels (e.g. piwheels.org) are inevitably not yet built! SEE #3560
- name: Run shell command "pg_config --version" to extract MAJOR version number -- strip off MINOR/PATCH version number(s)
shell: pg_config --version | sed 's/^[^0-9]*//; s/[^0-9].*//'
register: pg_config_version