Navigation Menu

Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Install the psycopg package if using postgres
Browse files Browse the repository at this point in the history
ref #4270
  • Loading branch information
David Davis committed Mar 11, 2019
1 parent 9d74cf5 commit 85a6f96
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/pulp3/README.md
Expand Up @@ -11,6 +11,8 @@ Role Variables:
* `pulp_cache_dir`: Location of Pulp cache. Defaults to "/var/lib/pulp/tmp".
* `pulp_config_dir`: Directory which will contain Pulp configuration files.
Defaults to "/etc/pulp".
* `pulp_db_type`: Type of db to install packages for. Options are postgres
or mysql. Default is postgres.
* `pulp_default_admin_password`: Initial password for the Pulp admin. **Required**.
* `pulp_install_dir`: Location of a virtual environment for Pulp and its Python
dependencies. Defaults to "/usr/local/lib/pulp".
Expand Down
1 change: 1 addition & 0 deletions roles/pulp3/defaults/main.yml
Expand Up @@ -2,6 +2,7 @@

pulp_cache_dir: '/var/lib/pulp/tmp'
pulp_config_dir: '/etc/pulp'
pulp_db_type: 'postgres'
pulp_default_admin_password: ''
pulp_install_dir: '/usr/local/lib/pulp'
pulp_install_plugins: {}
Expand Down
16 changes: 16 additions & 0 deletions roles/pulp3/tasks/install.yml
Expand Up @@ -66,6 +66,22 @@
virtualenv: '{{ pulp_install_dir }}'
virtualenv_command: '{{ pulp_python_interpreter }} -m venv'

- name: Install the psycopg python package
pip:
name: psycopg2-binary
state: present
virtualenv: '{{ pulp_install_dir }}'
virtualenv_command: '{{ pulp_python_interpreter }} -m venv'
when: pulp_db_type == "postgres"

- name: Install the mysqlclient python package
pip:
name: mysqlclient
state: present
virtualenv: '{{ pulp_install_dir }}'
virtualenv_command: '{{ pulp_python_interpreter }} -m venv'
when: pulp_db_type == "mysql"

- name: Install pulpcore package from source
pip:
name: '{{ pulp_source_dir }}'
Expand Down

0 comments on commit 85a6f96

Please sign in to comment.