Feat(pg): schema
All checks were successful
Ansible Playbook lint & deploy / ansible-lint (push) Successful in 12s
Ansible Playbook lint & deploy / run-ansible-mongo (push) Successful in 9s
Ansible Playbook lint & deploy / run-ansible-postgres (push) Successful in 10s

This commit is contained in:
2024-12-03 18:33:35 +00:00
parent 102b7d262e
commit 442e5f3d69

View File

@@ -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 }}"