mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-16 01:30:25 +00:00
Use separate state for restarting service re: postgresql.conf
This commit is contained in:
parent
e1a19ed78f
commit
65683252c4
1 changed files with 10 additions and 2 deletions
|
@ -122,7 +122,7 @@ postgresql-conf:
|
||||||
- file: postgresql-conf-comment-port
|
- file: postgresql-conf-comment-port
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
- watch_in:
|
- watch_in:
|
||||||
- service: postgresql-running
|
- service: postgresql-service-restart
|
||||||
|
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
|
@ -204,11 +204,19 @@ postgresql-running:
|
||||||
service.running:
|
service.running:
|
||||||
- name: {{ postgres.service }}
|
- name: {{ postgres.service }}
|
||||||
- enable: True
|
- enable: True
|
||||||
{% if grains.os not in ('MacOS',) and not db_port %}
|
{% if grains.os not in ('MacOS',) %}
|
||||||
- reload: True
|
- reload: True
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- watch:
|
- watch:
|
||||||
- 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