diff --git a/lib/ansible/modules/database/postgresql/postgresql_user.py b/lib/ansible/modules/database/postgresql/postgresql_user.py index 0823bd7cd90..c17b0a9a738 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_user.py +++ b/lib/ansible/modules/database/postgresql/postgresql_user.py @@ -191,7 +191,7 @@ def user_add(cursor, user, password, role_attr_flags, encrypted, expires): query.append("PASSWORD %(password)s") if expires is not None: query.append("VALID UNTIL %(expires)s") - query = query.append(role_attr_flags) + query.append(role_attr_flags) query = ' '.join(query) cursor.execute(query, query_password_data) return True