mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 00:03:10 +00:00
postgresql_db: fix inverted 'changed' logic when state=absent (#4934)
Fixes #4933.
This commit is contained in:
committed by
Matt Clay
parent
56211bd7ed
commit
9509224768
4
lib/ansible/modules/database/postgresql/postgresql_db.py
Normal file → Executable file
4
lib/ansible/modules/database/postgresql/postgresql_db.py
Normal file → Executable file
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user