diff --git a/cloud/amazon/ec2_vpc_nat_gateway.py b/cloud/amazon/ec2_vpc_nat_gateway.py index d1d38e0e030..b5874128f3d 100644 --- a/cloud/amazon/ec2_vpc_nat_gateway.py +++ b/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: