diff --git a/lib/ansible/modules/apt.py b/lib/ansible/modules/apt.py index d94244f1df2e32..0331014097e5b4 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__":