Change PostgreSQL config
This commit is contained in:
parent
40beb60635
commit
310c273019
2 changed files with 13 additions and 0 deletions
|
@ -1,2 +1,6 @@
|
|||
---
|
||||
postgres__hba: []
|
||||
|
||||
postgres__config:
|
||||
- key: listen_addresses
|
||||
value: '*'
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in a new issue