support options in extensions
This commit is contained in:
@@ -51,12 +51,14 @@ postgres:
|
|||||||
template: 'template0'
|
template: 'template0'
|
||||||
lc_ctype: 'C.UTF-8'
|
lc_ctype: 'C.UTF-8'
|
||||||
lc_collate: 'C.UTF-8'
|
lc_collate: 'C.UTF-8'
|
||||||
# optional extensions to enable on database
|
# optional schemas to enable on database
|
||||||
schemas:
|
schemas:
|
||||||
uuid_ossp:
|
uuid_ossp:
|
||||||
owner: localUser
|
owner: localUser
|
||||||
|
# optional extensions to enable on database
|
||||||
extensions:
|
extensions:
|
||||||
- uuid-ossp
|
uuid-ossp:
|
||||||
|
schema: uuid_ossp
|
||||||
db2:
|
db2:
|
||||||
owner: 'localUser'
|
owner: 'localUser'
|
||||||
user: 'remoteUser'
|
user: 'remoteUser'
|
||||||
@@ -65,7 +67,7 @@ postgres:
|
|||||||
lc_collate: 'C.UTF-8'
|
lc_collate: 'C.UTF-8'
|
||||||
# optional extensions to enable on database
|
# optional extensions to enable on database
|
||||||
extensions:
|
extensions:
|
||||||
- postgis
|
postgis:
|
||||||
# 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,*'
|
||||||
|
|||||||
@@ -133,12 +133,17 @@ postgres-schema-{{ schema }}-for-db-{{ name }}:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if db.extensions is defined %}
|
{% if db.extensions is defined %}
|
||||||
{% for ext in db.extensions %}
|
{% for ext, ext_args in db.extensions.items() %}
|
||||||
postgres-ext-{{ ext }}-for-db-{{ name }}:
|
postgres-ext-{{ ext }}-for-db-{{ name }}:
|
||||||
postgres_extension.present:
|
postgres_extension.present:
|
||||||
- name: {{ ext }}
|
- name: {{ ext }}
|
||||||
- user: {{ db.get('runas', 'postgres') }}
|
- user: {{ db.get('runas', 'postgres') }}
|
||||||
- maintenance_db: {{ name }}
|
- maintenance_db: {{ name }}
|
||||||
|
{% if ext_args is not none %}
|
||||||
|
{% for arg, value in ext_args.items() %}
|
||||||
|
- {{ arg }}: {{ value }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor%}
|
{% endfor%}
|
||||||
|
|||||||
Reference in New Issue
Block a user