fix: change memberships variables
This commit is contained in:
parent
0c2cb81ea1
commit
521d372dd8
2 changed files with 8 additions and 9 deletions
|
@ -130,21 +130,20 @@ Example:
|
||||||
### postgresql_role_memberships
|
### postgresql_role_memberships
|
||||||
|
|
||||||
| Name | Type | Required | Default | Comment |
|
| Name | Type | Required | Default | Comment |
|
||||||
|-----------|-------|----------|---------|-----------------------------------------|
|
|-----------|-------|----------|---------|------------------------------------------|
|
||||||
| key | str | yes | | the group role name |
|
| key | str | yes | | the role name |
|
||||||
| roles | array | yes | | the roles name to add in the role group |
|
| groups | array | yes | | the groups (roles) where to add the role |
|
||||||
| state | str | no | present | if absent the memberships are deleted |
|
| state | str | no | present | if absent the memberships are deleted |
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```
|
```
|
||||||
postgres:
|
postgres:
|
||||||
roles:
|
groups:
|
||||||
- myuser
|
- myuser
|
||||||
state: present
|
state: present
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -87,8 +87,8 @@
|
||||||
|
|
||||||
- name: manage role membership
|
- name: manage role membership
|
||||||
community.postgresql.postgresql_membership:
|
community.postgresql.postgresql_membership:
|
||||||
groups: '{{ item.key }}'
|
groups: '{{ item.value.groups }}'
|
||||||
target_roles: '{{ item.value.roles }}'
|
target_roles: '{{ item.key }}'
|
||||||
state: '{{ item.value.state | default("present") }}'
|
state: '{{ item.value.state | default("present") }}'
|
||||||
loop: '{{ postgresql_role_memberships | dict2items }}'
|
loop: '{{ postgresql_role_memberships | dict2items }}'
|
||||||
loop_control:
|
loop_control:
|
||||||
|
|
Loading…
Reference in a new issue