fix: change memberships variables
This commit is contained in:
parent
0c2cb81ea1
commit
521d372dd8
2 changed files with 8 additions and 9 deletions
13
README.md
13
README.md
|
@ -129,22 +129,21 @@ 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 |
|
||||
| state | str | no | present | if absent the memberships are deleted |
|
||||
| Name | Type | Required | Default | Comment |
|
||||
|-----------|-------|----------|---------|------------------------------------------|
|
||||
| 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
|
||||
|
||||
```
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue