diff --git a/lib/ansible/modules/database/postgresql/postgresql_user.py b/lib/ansible/modules/database/postgresql/postgresql_user.py index 9732c8bd38a..e31ebf19b39 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_user.py +++ b/lib/ansible/modules/database/postgresql/postgresql_user.py @@ -292,7 +292,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