fix: change memberships variables

This commit is contained in:
Adrien Waksberg 2022-11-18 14:58:45 +01:00
parent 0c2cb81ea1
commit 521d372dd8
2 changed files with 8 additions and 9 deletions

View file

@ -130,21 +130,20 @@ Example:
### postgresql_role_memberships
| Name | Type | Required | Default | Comment |
|-----------|-------|----------|---------|-----------------------------------------|
| key | str | yes | | the group role name |
| roles | array | yes | | the roles name to add in the role group |
|-----------|-------|----------|---------|------------------------------------------|
| key | str | yes | | the role name |
| groups | array | yes | | the groups (roles) where to add the role |
| state | str | no | present | if absent the memberships are deleted |
Example:
```
postgres:
roles:
groups:
- myuser
state: present
```
## How to use
```

View file

@ -87,8 +87,8 @@
- name: manage role membership
community.postgresql.postgresql_membership:
groups: '{{ item.key }}'
target_roles: '{{ item.value.roles }}'
groups: '{{ item.value.groups }}'
target_roles: '{{ item.key }}'
state: '{{ item.value.state | default("present") }}'
loop: '{{ postgresql_role_memberships | dict2items }}'
loop_control: