- 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:
Jon Nelson 2016-07-19 10:10:07 -05:00
parent 7a7396fcb2
commit 1c72c7c3a1

View file

@ -157,9 +157,15 @@ postgresql-db-{{ name }}:
{% else %} {% else %}
postgres_database.present: postgres_database.present:
- name: {{ name }} - name: {{ name }}
- encoding: {{ db.get('encoding', 'UTF8') }} {% if 'encoding' in db %}
- lc_ctype: {{ db.get('lc_ctype', 'en_US.UTF8') }} - encoding: {{ db.encoding }}
- lc_collate: {{ db.get('lc_collate', 'en_US.UTF8') }} {% 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') }} - template: {{ db.get('template', 'template0') }}
- tablespace: {{ db.get('tablespace', 'pg_default') }} - tablespace: {{ db.get('tablespace', 'pg_default') }}
{% if db.get('owner') %} {% if db.get('owner') %}