-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfiguration.yml
More file actions
28 lines (26 loc) · 813 Bytes
/
configuration.yml
File metadata and controls
28 lines (26 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
- name: Configure files pg_dba.conf and postgresql.conf
hosts: all
vars_files:
vars/main.yml
tasks:
- name: Configure host based authentication (if entries are configured).
template:
src: "templates/postgresql.conf.j2"
dest: "{{ postgresql_config_path }}/postgresql.conf"
owner: "postgres"
group: "postgres"
mode: 0600
notify: restart postgresql
when: listen_addresses | length > 0
- name: Configure host based authentication (if entries are configured).
template:
src: "templates/pg_hba.conf.j2"
dest: "{{ postgresql_config_path }}/pg_hba.conf"
owner: "postgres"
group: "postgres"
mode: 0600
notify: restart postgresql
when: hba_entries | length > 0
handlers:
- import_tasks: handlers/main.yml