Add configuration for users and databases
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
jeltz 2021-03-10 13:23:52 +01:00
parent 879e033857
commit 9ef6202fdf
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,4 @@
---
postgresql_db: []
postgresql_users: []
...

View File

@ -37,3 +37,17 @@
- postgresql.conf
notify:
- restart postgresql
- name: Create databases
postgresql_db:
name: "{{ item.name }}"
loop: "{{ postgresql_databases }}"
- name: Create users
postgresql_user:
db: "{{ item.database }}"
name: "{{ item.name }}"
password: "{{ item.password }}"
priv: "{{ item.priv }}"
loop: "{{ postgresql_users }}"
...