16 lines
550 B
Plaintext
16 lines
550 B
Plaintext
---
|
|
{%- from "postgresql/map.jinja" import postgresql with context %}
|
|
{%- for database in postgresql.databases %}
|
|
postgresql_database_{{ database.name }}:
|
|
postgres_database.present:
|
|
- name: {{ database.name }}
|
|
- owner: {{ database.user }}
|
|
- db_user: postgres
|
|
- template: template0
|
|
- encoding: {{ database.encoding }}
|
|
- lc_collate: {{ database.collate|default("en_US.UTF-8") }}
|
|
- lc_ctype: {{ database.ctype|default("en_US.UTF-8") }}
|
|
- require:
|
|
- postgres_user: postgresql_user_{{ database.user }}
|
|
{% endfor %}
|