postgresql: optionally install/delete schemas inside a database.
This commit is contained in:
parent
438fb8407e
commit
11b1f31920
|
@ -15,6 +15,16 @@
|
|||
when: item.managedb | default(True)
|
||||
tags: [ 'postgresql', 'postgres', 'pg_db' ]
|
||||
|
||||
- name: Add schemas to a database.
|
||||
become: True
|
||||
become_user: postgres
|
||||
postgresql_schema: database={{ item.0.name }} port={{ psql_db_port }} name={{ item.1 }} owner={{ item.0.user }} state={{ item.0.schemastate | default('present') }}
|
||||
with_subelements:
|
||||
- '{{ psql_db_data | default([]) }}'
|
||||
- schema
|
||||
when: item.manageschema | default(False)
|
||||
tags: [ 'postgresql', 'postgres', 'pg_db', 'pg_schema' ]
|
||||
|
||||
- name: Define a user with password, with no associated DBs
|
||||
become: True
|
||||
become_user: postgres
|
||||
|
|
Loading…
Reference in New Issue