mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-17 10:10:31 +00:00
Added option to disable creation of backup file when postgresql.conf changes
This commit is contained in:
parent
a0d76f3418
commit
11f4f0f580
3 changed files with 7 additions and 0 deletions
|
@ -71,6 +71,9 @@ postgres:
|
||||||
# optional extensions to enable on database
|
# optional extensions to enable on database
|
||||||
extensions:
|
extensions:
|
||||||
postgis:
|
postgis:
|
||||||
|
# backup extension defaults to .bak if postgresconf_backup is True.
|
||||||
|
# Set to False to stop creation of backup on postgresql.conf changes.
|
||||||
|
postgresconf_backup: True
|
||||||
# This section will append your configuration to postgresql.conf.
|
# This section will append your configuration to postgresql.conf.
|
||||||
postgresconf: |
|
postgresconf: |
|
||||||
listen_addresses = 'localhost,*'
|
listen_addresses = 'localhost,*'
|
||||||
|
|
|
@ -15,6 +15,7 @@ postgres:
|
||||||
acls: []
|
acls: []
|
||||||
databases: {}
|
databases: {}
|
||||||
tablespaces: {}
|
tablespaces: {}
|
||||||
|
postgresconf_backup: True
|
||||||
postgresconf: ""
|
postgresconf: ""
|
||||||
pg_hba.conf: salt://postgres/pg_hba.conf
|
pg_hba.conf: salt://postgres/pg_hba.conf
|
||||||
commands:
|
commands:
|
||||||
|
|
|
@ -59,6 +59,9 @@ postgresql-conf:
|
||||||
{{ postgres.postgresconf|indent(8) }}
|
{{ postgres.postgresconf|indent(8) }}
|
||||||
- show_changes: True
|
- show_changes: True
|
||||||
- append_if_not_found: True
|
- append_if_not_found: True
|
||||||
|
{% if not postgres.postgresconf_backup|default(True) -%}
|
||||||
|
- backup: False
|
||||||
|
{% endif -%}
|
||||||
- watch_in:
|
- watch_in:
|
||||||
- service: run-postgresql
|
- service: run-postgresql
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue