Fix postgres_user not commiting changes when groups is set (#64835)
This commit is contained in:
parent
9e023a91a6
commit
7b18723858
2 changed files with 3 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- postgresql_user - fix the module doesn't correctly commit changes if groups is set (https://github.com/ansible/ansible/issues/64806).
|
|
@ -940,7 +940,7 @@ def main():
|
||||||
target_roles = []
|
target_roles = []
|
||||||
target_roles.append(user)
|
target_roles.append(user)
|
||||||
pg_membership = PgMembership(module, cursor, target_roles, groups)
|
pg_membership = PgMembership(module, cursor, target_roles, groups)
|
||||||
changed = pg_membership.grant()
|
changed = pg_membership.grant() or changed
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if user_exists(cursor, user):
|
if user_exists(cursor, user):
|
||||||
|
|
Loading…
Reference in a new issue