Use postgresql_privs
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing

This commit is contained in:
jeltz 2021-03-10 14:27:14 +01:00
parent 40eadf802c
commit 06b54d5f89

View file

@ -57,7 +57,17 @@
db: "{{ item.database }}"
name: "{{ item.name }}"
password: "{{ item.password }}"
priv: "{{ item.priv }}"
no_log: true
loop: "{{ postgresql_users }}"
- name: Grant privileges to users
become: true
become_user: postgres
postgresql_privs:
db: postgres
type: database
role: "{{ item.name }}"
privs: "{{ item.privs | join(',') }}"
obj: "{{ item.database }}"
loop: "{{ postgresql_users }}"
...