diff --git a/postgres/server/init.sls b/postgres/server/init.sls index 9a89184..ddb736c 100644 --- a/postgres/server/init.sls +++ b/postgres/server/init.sls @@ -122,7 +122,14 @@ postgresql-conf: - file: postgresql-conf-comment-port {%- endif %} - watch_in: - - service: postgresql-service-restart + - module: postgresql-service-restart + +# Restart the service where reloading is not sufficient +# Currently only when changes are made to `postgresql.conf` +postgresql-service-restart: + module.wait: + - name: service.restart + - m_name: {{ postgres.service }} {%- endif %} @@ -211,12 +218,4 @@ postgresql-running: - file: postgresql-pg_hba - file: postgresql-pg_ident -# Restart the service where reloading is not sufficient -# Currently when changes are made to `postgresql.conf` -{%- if postgres.postgresconf or db_port %} -postgresql-service-restart: - service.running: - - name: {{ postgres.service }} -{%- endif %} - {%- endif %}