mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 19:01:26 -07:00
cs_zone_facts: implement return facts as ansible returns (#36993)
This commit is contained in:
parent
d1eb4fe58c
commit
6578403288
3 changed files with 75 additions and 54 deletions
|
@ -631,3 +631,16 @@ class AnsibleCloudStack:
|
|||
if 'tags' in resource:
|
||||
self.result['tags'] = resource['tags']
|
||||
return self.result
|
||||
|
||||
def get_result_and_facts(self, facts_name, resource):
|
||||
result = self.get_result(resource)
|
||||
|
||||
ansible_facts = {
|
||||
facts_name: result.copy()
|
||||
}
|
||||
for k in ['diff', 'changed']:
|
||||
if k in ansible_facts[facts_name]:
|
||||
del ansible_facts[facts_name][k]
|
||||
|
||||
result.update(ansible_facts=ansible_facts)
|
||||
return result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue