switched to return facts

This commit is contained in:
Brian Coca 2016-05-04 08:43:11 -04:00 committed by Matt Clay
parent c03e1bd2d5
commit 985abd2020

View file

@ -289,8 +289,8 @@ powerstate:
returned: always returned: always
type: string type: string
sample: running sample: running
state: azure_rm_vm:
description: Facts about the current state of the object. description: Facts about the current state of the object. Note that facts are not part of the registered output but available directly.
returned: always returned: always
type: dict type: dict
sample: { sample: {
@ -520,7 +520,7 @@ class AzureRMVirtualMachine(AzureRMModuleBase):
changed=False, changed=False,
actions=[], actions=[],
powerstate_change=None, powerstate_change=None,
state=dict() ansible_facts=dict('azure_rm_vm')
) )
super(AzureRMVirtualMachine, self).__init__(derived_arg_spec=self.module_arg_spec, super(AzureRMVirtualMachine, self).__init__(derived_arg_spec=self.module_arg_spec,
@ -666,7 +666,7 @@ class AzureRMVirtualMachine(AzureRMModuleBase):
changed = True changed = True
self.results['changed'] = changed self.results['changed'] = changed
self.results['state'] = results self.results['ansible_facts']['azure_rm_vm'] = results
self.results['powerstate_change'] = powerstate_change self.results['powerstate_change'] = powerstate_change
if self.check_mode: if self.check_mode: