mirror of
https://gitea.0xace.cc/ansible-galaxy/postgresql.git
synced 2024-11-28 17:56:40 +00:00
41 lines
1.4 KiB
YAML
41 lines
1.4 KiB
YAML
---
|
|
- name: Merge user options for PostgreSQL config
|
|
set_fact:
|
|
postgresql_combined_parameters: "{{ postgresql_default_parameters | combine(postgresql_custom_parameters|default({}), recursive=true) }}"
|
|
|
|
- name: Merge backup options for PostgreSQL config
|
|
set_fact:
|
|
postgresql_combined_parameters: "{{ postgresql_combined_parameters | combine(postgresql_backup_parameters|default({}), recursive=true) }}"
|
|
when:
|
|
|
|
- name: Propagate PostgreSQL configs
|
|
block:
|
|
- name: Template PostgreSQL pg_hba configuration
|
|
template:
|
|
src: "{{ postgresql_major_version }}-pg_hba.conf.j2"
|
|
dest: "{{ postgresql_data_dir }}/pg_hba.conf"
|
|
mode: 0600
|
|
owner: postgres
|
|
group: postgres
|
|
register: pg_hba_config_file
|
|
notify: Restart PostgreSQL
|
|
- name: Template PostgreSQL configuration
|
|
template:
|
|
src: "{{ postgresql_major_version }}-postgresql.conf.j2"
|
|
dest: "{{ postgresql_data_dir }}/postgresql.conf"
|
|
mode: 0600
|
|
owner: postgres
|
|
group: postgres
|
|
register: postgresql_config_file
|
|
notify: Restart PostgreSQL
|
|
- name: Template PostgreSQL SSL configuration
|
|
template:
|
|
src: "{{ postgresql_major_version }}-postgresql.ssl.conf.j2"
|
|
dest: "{{ postgresql_data_dir }}/postgresql.ssl.conf"
|
|
mode: 0600
|
|
owner: postgres
|
|
group: postgres
|
|
register: postgresql_ssl_config_file
|
|
notify: Restart PostgreSQL
|
|
when: postgresql_ssl
|