Feat(pg): schema
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
---
|
||||
- name: Set username and password
|
||||
ansible.builtin.set_fact:
|
||||
database: "{{ postgres_users_database }}"
|
||||
username: "{{ postgres_users_username }}"
|
||||
password: "{{ postgres_users_password }}"
|
||||
database: "{{ postgres_users_database | default(postgres_users_username) }}"
|
||||
schema: "{{ postgres_users_schema | default('public') }}"
|
||||
- name: Create DB, role, and privs
|
||||
become: true
|
||||
become_user: postgres
|
||||
@@ -18,6 +19,10 @@
|
||||
password: "{{ password }}"
|
||||
environment:
|
||||
PGOPTIONS: "-c password_encryption=scram-sha-256"
|
||||
- name: Configure schema
|
||||
community.postgresql.postgresql_schema:
|
||||
name: "{{ schema }}"
|
||||
owner: "{{ username }}"
|
||||
- name: Configure privileges
|
||||
community.postgresql.postgresql_privs:
|
||||
db: "{{ database }}"
|
||||
|
||||
Reference in New Issue
Block a user