library/roles/postgresql: Various fixes for some complex cases.

This commit is contained in:
Andrea Dell'Amico 2017-03-07 13:12:36 +01:00
parent 892a05256a
commit f8254e1a82
3 changed files with 6 additions and 1 deletions

View File

@ -28,7 +28,6 @@
- include: postgresql-backup.yml
when:
- psql_postgresql_install
- psql_db_data is defined
- include: pgpool-ii.yml
when: psql_pgpool_service_install
- include: postgresql-letsencrypt-acmetool.yml

View File

@ -5,12 +5,16 @@
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
- name: Set the postgresql data dir if it is different from the default
become: True
become_user: postgres
action: configfile path={{ psql_conf_dir }}/postgresql.conf key=data_directory value="'{{ psql_data_dir }}'"
notify: Restart postgresql
when: psql_use_alternate_data_dir
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
- name: Set some postgresql configuration parameters
become: True
become_user: postgres
action: configfile path={{ psql_conf_dir }}/postgresql.conf key={{ item.name }} value="{{ item.value }}"
with_items: '{{ psql_conf_parameters }}'
when: item.set == 'True'

View File

@ -1,6 +1,8 @@
---
- block:
- name: Setup ssl in the postgresql configuration
become: True
become_user: postgres
action: configfile path=/etc/postgresql/{{ psql_version }}/main/postgresql.conf key={{ item.name }} value="'{{ item.value }}'"
with_items: '{{ psql_conf_ssl_parameters }}'
notify: Restart postgresql