mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-16 01:30:25 +00:00
- for encoding, lc_type, and lc_collate, only set them on the database if
they are explicitly supplied. Otherwise use the postgres database defaults.
This commit is contained in:
parent
7a7396fcb2
commit
1c72c7c3a1
1 changed files with 9 additions and 3 deletions
|
@ -157,9 +157,15 @@ postgresql-db-{{ name }}:
|
|||
{% else %}
|
||||
postgres_database.present:
|
||||
- name: {{ name }}
|
||||
- encoding: {{ db.get('encoding', 'UTF8') }}
|
||||
- lc_ctype: {{ db.get('lc_ctype', 'en_US.UTF8') }}
|
||||
- lc_collate: {{ db.get('lc_collate', 'en_US.UTF8') }}
|
||||
{% if 'encoding' in db %}
|
||||
- encoding: {{ db.encoding }}
|
||||
{% endif %}
|
||||
{% if 'lc_ctype' in db %}
|
||||
- lc_ctype: {{ db.lc_type }}
|
||||
{% endif %}
|
||||
{% if 'lc_collate' in db %}
|
||||
- lc_collate: {{ db.lc_collate }}
|
||||
{% endif %}
|
||||
- template: {{ db.get('template', 'template0') }}
|
||||
- tablespace: {{ db.get('tablespace', 'pg_default') }}
|
||||
{% if db.get('owner') %}
|
||||
|
|
Loading…
Add table
Reference in a new issue