library/roles/postgresql: pgpool needs some parts installed on the postgresql server.

This commit is contained in:
Andrea Dell'Amico 2016-03-04 12:58:49 +01:00
parent 055128b70a
commit a02043382f
2 changed files with 10 additions and 1 deletions

View File

@ -48,9 +48,12 @@ psql_db_name: db_name
psql_db_user: db_user psql_db_user: db_user
psql_db_pwd: "We cannot save the password into the repository. Use another variable and change pgpass.j2 accordingly. Encrypt the file that contains the variable with ansible-vault" psql_db_pwd: "We cannot save the password into the repository. Use another variable and change pgpass.j2 accordingly. Encrypt the file that contains the variable with ansible-vault"
# Those need to be installed on the postgresql server.
postgresql_pgpool_pkgs:
- 'postgresql-{{ psql_version }}-pgpool2'
# pgpool-II # pgpool-II
pgpool_pkgs: pgpool_pkgs:
- 'postgresql-{{ psql_version }}-pgpool2'
- pgpool2 - pgpool2
# postgis # postgis

View File

@ -11,6 +11,12 @@
- python-psycopg2 - python-psycopg2
tags: [ 'postgresql', 'postgres' ] tags: [ 'postgresql', 'postgres' ]
- name: Install the packages needed by postgres when running behind a pgpool server
apt: pkg={{ item }} state={{ psql_pkg_state }}
with_items: '{{ postgresql_pgpool_pkgs }}'
when: psql_pgpool_install
tags: [ 'postgresql', 'postgres', 'pgpool' ]
- name: Ensure that the postgresql server is started - name: Ensure that the postgresql server is started
service: name=postgresql state=started enabled=yes service: name=postgresql state=started enabled=yes
when: postgresql_enabled when: postgresql_enabled