diff options
author | Marius Gedminas <marius@gedmin.as> | 2016-09-21 20:14:03 +0300 |
---|---|---|
committer | René Moser <mail@renemoser.net> | 2016-09-21 19:14:03 +0200 |
commit | c354c974e74d79589b5d08de0365f94aaa03b309 (patch) | |
tree | 1980b4e25576aa04f0eeebe384a0125e186c9138 | |
parent | 4bd2a409e6409f703005b3ccf2603b9db19db9b0 (diff) | |
download | ansible-modules-core-c354c974e74d79589b5d08de0365f94aaa03b309.tar.gz |
postgresql_db: fix inverted 'changed' logic when state=absent (#4934)
Fixes #4933.
-rwxr-xr-x[-rw-r--r--] | database/postgresql/postgresql_db.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/database/postgresql/postgresql_db.py b/database/postgresql/postgresql_db.py index 33e812bc..64871ed1 100644..100755 --- a/database/postgresql/postgresql_db.py +++ b/database/postgresql/postgresql_db.py @@ -288,11 +288,11 @@ def main(): try: if module.check_mode: if state == "absent": - changed = not db_exists(cursor, db) + changed = db_exists(cursor, db) elif state == "present": changed = not db_matches(cursor, db, owner, template, encoding, lc_collate, lc_ctype) - module.exit_json(changed=changed,db=db) + module.exit_json(changed=changed, db=db) if state == "absent": try: |