From 459724da6bbc8d45eadb69500d59133d723fd640 Mon Sep 17 00:00:00 2001 From: Will Thames Date: Tue, 14 Mar 2017 03:15:45 +1000 Subject: [PATCH] [cloud] Convert nat gateway facts to ansible format (#20962) Use camel_dict_to_snake_dict --- lib/ansible/modules/cloud/amazon/ec2_vpc_nat_gateway_facts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/cloud/amazon/ec2_vpc_nat_gateway_facts.py b/lib/ansible/modules/cloud/amazon/ec2_vpc_nat_gateway_facts.py index a4ececc932..e5bb8c8439 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_vpc_nat_gateway_facts.py +++ b/lib/ansible/modules/cloud/amazon/ec2_vpc_nat_gateway_facts.py @@ -81,7 +81,7 @@ EXAMPLES = ''' RETURN = ''' result: - description: The result of the describe. + description: The result of the describe, converted to ansible snake case style. See http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.Client.describe_nat_gateways for the response. returned: success type: list @@ -114,7 +114,7 @@ def get_nat_gateways(client, module, nat_gateway_id=None): except Exception as e: module.fail_json(msg=str(e.message)) - return result['NatGateways'] + return [camel_dict_to_snake_dict(gateway) for gateway in result['NatGateways']] def main():