diff --git a/lib/ansible/modules/database/postgresql/postgresql_user.py b/lib/ansible/modules/database/postgresql/postgresql_user.py index 3240e92181e..dfd4f93062b 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_user.py +++ b/lib/ansible/modules/database/postgresql/postgresql_user.py @@ -419,6 +419,8 @@ def revoke_privileges(cursor, user, privs): return False changed = False + revoke_funcs = dict(table=revoke_table_privilege, database=revoke_database_privilege) + check_funcs = dict(table=has_table_privilege, database=has_database_privilege) for type_ in privs: revoke_func = { 'table':revoke_table_privilege, @@ -434,6 +436,8 @@ def revoke_privileges(cursor, user, privs): def grant_privileges(cursor, user, privs): if privs is None: return False + grant_funcs = dict(table=grant_table_privilege, database=grant_database_privilege) + check_funcs = dict(table=has_table_privilege, database=has_database_privilege) changed = False for type_ in privs: