Issue #1403: Don't override defaults on old CentOS 6 install.

This commit is contained in:
Jeff Geerling 2017-06-02 16:57:37 -05:00
parent 31d15f6a3c
commit 2b9105084c
2 changed files with 4 additions and 2 deletions

View File

@ -8,7 +8,7 @@
with_items: "{{ postgresql_global_config_options }}" with_items: "{{ postgresql_global_config_options }}"
notify: restart postgresql notify: restart postgresql
- name: Configure host based authentication. - name: Configure host based authentication (if entries are configured).
template: template:
src: "templates/pg_hba.conf.j2" src: "templates/pg_hba.conf.j2"
dest: "{{ postgresql_config_path }}/pg_hba.conf" dest: "{{ postgresql_config_path }}/pg_hba.conf"
@ -16,6 +16,7 @@
group: "{{ postgresql_group }}" group: "{{ postgresql_group }}"
mode: 0600 mode: 0600
notify: restart postgresql notify: restart postgresql
when: postgresql_hba_entries
- name: Ensure PostgreSQL unix socket dirs exist. - name: Ensure PostgreSQL unix socket dirs exist.
file: file:

View File

@ -12,8 +12,9 @@
apt: update_cache=yes cache_valid_time=600 apt: update_cache=yes cache_valid_time=600
when: ansible_os_family == 'Debian' when: ansible_os_family == 'Debian'
- name: Set custom variable name for old CentOS 6 PostgreSQL install. - name: Set custom variables for old CentOS 6 PostgreSQL install.
set_fact: set_fact:
postgresql_hba_entries: []
postgresql_global_config_options: postgresql_global_config_options:
- option: unix_socket_directory - option: unix_socket_directory
value: '{{ postgresql_unix_socket_directories[0] }}' value: '{{ postgresql_unix_socket_directories[0] }}'