diff --git a/lib/ansible/modules/database/postgresql/postgresql_user.py b/lib/ansible/modules/database/postgresql/postgresql_user.py index 016297f1b77..977e64bd807 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_user.py +++ b/lib/ansible/modules/database/postgresql/postgresql_user.py @@ -285,7 +285,7 @@ def user_alter(cursor, module, user, password, role_attr_flags, encrypted, expir # Do we actually need to do anything? pwchanging = False if password is not None: - if encrypted: + if encrypted == 'ENCRYPTED': if password.startswith('md5'): if password != current_role_attrs['rolpassword']: pwchanging = True