1
0
Fork 0

Change PostgreSQL config

This commit is contained in:
Alex Kotov 2020-07-05 11:35:38 +05:00
parent 40beb60635
commit 310c273019
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 13 additions and 0 deletions

View file

@ -1,2 +1,6 @@
---
postgres__hba: []
postgres__config:
- key: listen_addresses
value: '*'

View file

@ -12,3 +12,12 @@
owner: postgres
group: postgres
notify: Restart Postgres
- name: Change config
lineinfile:
dest: '/etc/postgresql/12/main/postgresql.conf'
regexp: '^#?{{ item.key }}(( |=).*)?$'
line: "{{ item.key }} = '{{ item.value }}'"
state: "{{ item.state | default('present') }}"
with_items: '{{ postgres__config }}'
notify: Restart Postgres