mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
VMware: Gather facts when powerstate is specified (#37908)
This fix adds additional facts after VM powerstate management. Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
@@ -826,8 +826,7 @@ def set_vm_power_state(content, vm, state, force, timeout=0):
|
||||
result['changed'] = True
|
||||
|
||||
# need to get new metadata if changed
|
||||
if result['changed']:
|
||||
result['instance'] = gather_vm_facts(content, vm)
|
||||
result['instance'] = gather_vm_facts(content, vm)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@@ -2134,6 +2134,7 @@ def main():
|
||||
result["changed"] = True
|
||||
if not tmp_result["failed"]:
|
||||
result["failed"] = False
|
||||
result['instance'] = tmp_result['instance']
|
||||
else:
|
||||
# This should not happen
|
||||
raise AssertionError()
|
||||
|
||||
Reference in New Issue
Block a user