mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-16 01:30:25 +00:00
Avoid duplicate Jinja conditional block by moving service restart
This commit is contained in:
parent
65683252c4
commit
79ab1a2930
1 changed files with 8 additions and 9 deletions
|
@ -122,7 +122,14 @@ postgresql-conf:
|
||||||
- file: postgresql-conf-comment-port
|
- file: postgresql-conf-comment-port
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
- watch_in:
|
- 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 %}
|
{%- endif %}
|
||||||
|
|
||||||
|
@ -211,12 +218,4 @@ postgresql-running:
|
||||||
- file: postgresql-pg_hba
|
- file: postgresql-pg_hba
|
||||||
- file: postgresql-pg_ident
|
- 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 %}
|
{%- endif %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue