Set subnet with postgresql_set
This commit is contained in:
parent
1671185876
commit
afbfd5d645
@ -1,8 +1,12 @@
|
||||
- name: PostgreSQL listen on private subnet
|
||||
replace:
|
||||
path: /etc/postgresql/12/main/postgresql.conf
|
||||
regexp: "(#?)listen_addresses = '.*'"
|
||||
replace: "listen_addresses = '{{ ansible_ens10.ipv4.address }},localhost'"
|
||||
- name: PostgreSQL set defaults
|
||||
become_user: postgres
|
||||
loop:
|
||||
- { name: "listen_addresses", value: "{{ ansible_ens10.ipv4.address }},localhost" }
|
||||
postgresql_set:
|
||||
port: '{{ postgres.port }}'
|
||||
db: postgres
|
||||
name: "{{ item.name }}"
|
||||
value: "{{ item.value }}"
|
||||
notify: Run service actions
|
||||
tags:
|
||||
- postgres
|
||||
|
Reference in New Issue
Block a user