feat: add role membership
This commit is contained in:
parent
b9ade3b702
commit
186894b7c1
3 changed files with 33 additions and 0 deletions
tasks
|
@ -83,3 +83,16 @@
|
|||
become_user: postgres
|
||||
when: postgresql_primary
|
||||
tags: postgresql
|
||||
|
||||
- name: manage role membership
|
||||
community.postgresql.postgresql_membership:
|
||||
groups: '{{ item.key }}'
|
||||
target_roles: '{{ item.value.roles }}'
|
||||
state: '{{ item.value.state|default("present") }}'
|
||||
loop: '{{ postgresql_role_memberships|dict2items }}'
|
||||
loop_control:
|
||||
label: '{{ item.key }}'
|
||||
become: true
|
||||
become_user: postgres
|
||||
when: postgresql_primary
|
||||
tags: postgresql
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue