Skip to content

Commit cce4cbf

Browse files
RobRuanamyii
authored andcommitted
Fix #236: Reload postgres service after ACL changes in pg_hba.conf
* ef87358
1 parent c213b30 commit cce4cbf

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
@@ -147,13 +147,6 @@ postgresql-conf:
147147
148148
{%- endif %}
149149
150-
# Restart the service where reloading is not sufficient
151-
# Currently when the cluster is created or changes made to `postgresql.conf`
152-
postgresql-service-restart:
153-
module.wait:
154-
- name: service.restart
155-
- m_name: {{ postgres.service }}
156-
157150
{%- set pg_hba_path = salt['file.join'](postgres.conf_dir, 'pg_hba.conf') %}
158151
159152
postgresql-pg_hba:
@@ -180,6 +173,15 @@ postgresql-pg_hba:
180173
{%- endif %}
181174
- require:
182175
- file: postgresql-config-dir
176+
- watch_in:
177+
- module: postgresql-service-restart
178+
179+
# Restart the service where reloading is not sufficient
180+
# Currently when the cluster is created or changes made to `postgresql.conf`
181+
postgresql-service-restart:
182+
module.wait:
183+
- name: service.restart
184+
- m_name: {{ postgres.service }}
183185
184186
{%- set pg_ident_path = salt['file.join'](postgres.conf_dir, 'pg_ident.conf') %}
185187

0 commit comments

Comments
 (0)