From b043afa025063fb452c8e01736c919cd2e7ef410 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Wed, 28 Apr 2021 10:13:38 +0530 Subject: [PATCH] apt: Fix fail_json API call (#74444) --- lib/ansible/modules/apt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/apt.py b/lib/ansible/modules/apt.py index d94244f1df2..0331014097e 100644 --- a/lib/ansible/modules/apt.py +++ b/lib/ansible/modules/apt.py @@ -1321,7 +1321,7 @@ def main(): module.fail_json(msg="Could not fetch updated apt files: %s" % fetchFailedException) # got here w/o exception and/or exit??? - module.exit_json({'failed': True, 'msg': 'Unexpected code path taken,we really should have exited before, this is a bug'}) + module.fail_json(msg='Unexpected code path taken, we really should have exited before, this is a bug') if __name__ == "__main__":