cloudformation_info - fix KeyError (#62290)

* cloudformation_info - fix KeyError

* changelog
This commit is contained in:
Sloane Hertel 2019-09-18 09:58:58 -04:00 committed by GitHub
parent b87b359df5
commit 66e5427ffb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- cloudformation_info - Fix a KeyError returning information about the stack(s).

View file

@ -295,7 +295,10 @@ def main():
service_mgr = CloudFormationServiceManager(module) service_mgr = CloudFormationServiceManager(module)
result = {'ansible_facts': {'cloudformation': {}}} if is_old_facts:
result = {'ansible_facts': {'cloudformation': {}}}
else:
result = {'cloudformation': {}}
for stack_description in service_mgr.describe_stacks(module.params.get('stack_name')): for stack_description in service_mgr.describe_stacks(module.params.get('stack_name')):
facts = {'stack_description': stack_description} facts = {'stack_description': stack_description}