From ba17bdf1d0e3184a123313d3b2059d7d22c3d796 Mon Sep 17 00:00:00 2001 From: Allen Sanabria Date: Thu, 4 Aug 2016 15:36:39 -0700 Subject: [PATCH] fail_json when error and not exit_json --- lib/ansible/modules/extras/cloud/amazon/ec2_vpc_nat_gateway.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/cloud/amazon/ec2_vpc_nat_gateway.py b/lib/ansible/modules/extras/cloud/amazon/ec2_vpc_nat_gateway.py index d9f8b819dd3..b6dca5fd9f6 100644 --- a/lib/ansible/modules/extras/cloud/amazon/ec2_vpc_nat_gateway.py +++ b/lib/ansible/modules/extras/cloud/amazon/ec2_vpc_nat_gateway.py @@ -1062,7 +1062,7 @@ def main(): ) if not success: - module.exit_json( + module.fail_json( msg=err_msg, success=success, changed=changed ) else: