From 54316f7da05888c44fd9e7481362e391c0b01d30 Mon Sep 17 00:00:00 2001 From: Albert Casademont Date: Tue, 11 Apr 2017 14:09:16 +0200 Subject: [PATCH] Fix Postgres user module always reporting changes (#23488) --- lib/ansible/modules/database/postgresql/postgresql_user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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