Fix ec2_asg_facts when `name` parameter is None

Closes #3021
reviewable/pr18780/r1
Ryan S. Brown 8 years ago
parent 372828de01
commit cf053d0e9c

@ -299,7 +299,11 @@ def find_asgs(conn, module, name=None, tags=None):
module.fail_json(msg=e.message, **camel_dict_to_snake_dict(e.response))
matched_asgs = []
if name is not None:
# if the user didn't specify a name
name_prog = re.compile(r'^' + name)
for asg in asgs['AutoScalingGroups']:
if name:
matched_name = name_prog.search(asg['AutoScalingGroupName'])

Loading…
Cancel
Save