From 4351326850b25e77f83590ed057acadd52ac874b Mon Sep 17 00:00:00 2001 From: Daryl Banttari Date: Tue, 26 Mar 2019 11:00:50 -0500 Subject: [PATCH] Fix ec2_asg_facts so it doesn't fail when using templates instead of configurations (#53017) --- lib/ansible/modules/cloud/amazon/ec2_asg_facts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/amazon/ec2_asg_facts.py b/lib/ansible/modules/cloud/amazon/ec2_asg_facts.py index f439c02c250..713c74b15ef 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_asg_facts.py +++ b/lib/ansible/modules/cloud/amazon/ec2_asg_facts.py @@ -363,7 +363,8 @@ def find_asgs(conn, module, name=None, tags=None): if matched_name and matched_tags: asg = camel_dict_to_snake_dict(asg) # compatibility with ec2_asg module - asg['launch_config_name'] = asg['launch_configuration_name'] + if 'launch_configuration_name' in asg: + asg['launch_config_name'] = asg['launch_configuration_name'] # workaround for https://github.com/ansible/ansible/pull/25015 if 'target_group_ar_ns' in asg: asg['target_group_arns'] = asg['target_group_ar_ns']