Skip to content

Commit ef87358

Browse files
committed
Reloading the postgres service is not enough to pick up ACL changes in pg_hba.conf
1 parent 5c77a33 commit ef87358

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

postgres/server/init.sls

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,6 @@ postgresql-conf:
143143
144144
{%- endif %}
145145
146-
# Restart the service where reloading is not sufficient
147-
# Currently when the cluster is created or changes made to `postgresql.conf`
148-
postgresql-service-restart:
149-
module.wait:
150-
- name: service.restart
151-
- m_name: {{ postgres.service }}
152-
153146
{%- set pg_hba_path = salt['file.join'](postgres.conf_dir, 'pg_hba.conf') %}
154147
155148
postgresql-pg_hba:
@@ -176,6 +169,15 @@ postgresql-pg_hba:
176169
{%- endif %}
177170
- require:
178171
- file: postgresql-config-dir
172+
- watch_in:
173+
- module: postgresql-service-restart
174+
175+
# Restart the service where reloading is not sufficient
176+
# Currently when the cluster is created or changes made to `postgresql.conf`
177+
postgresql-service-restart:
178+
module.wait:
179+
- name: service.restart
180+
- m_name: {{ postgres.service }}
179181
180182
{%- set pg_ident_path = salt['file.join'](postgres.conf_dir, 'pg_ident.conf') %}
181183

0 commit comments

Comments
 (0)