Fix postgres_user not commiting changes when groups is set (#64835)

This commit is contained in:
Andrey Klychkov 2019-12-04 01:57:02 +03:00 committed by Matt Davis
parent 9e023a91a6
commit 7b18723858
2 changed files with 3 additions and 1 deletions

View file

@ -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).

View file

@ -940,7 +940,7 @@ def main():
target_roles = []
target_roles.append(user)
pg_membership = PgMembership(module, cursor, target_roles, groups)
changed = pg_membership.grant()
changed = pg_membership.grant() or changed
else:
if user_exists(cursor, user):