Hi, I am trying to use this code to check VM power state and its failing
for me with this error..
"msg": "The conditional check 'result.hw_power_status == \"POWERED OFF\"'
failed. The error was: error while evaluating conditional
(result.hw_power_status == \"POWERED OFF\"): 'dict object' has no attribute
'hw_power_status'"
My playbook..
Enter code here... - name: Wait till {{ target }} is powered off
vsphere_guest:
vcenter_hostname="{{ vcenter_server }}"
[email protected]
password="{{ vc_passwd }}"
guest=mbu-zabbix-ccp
validate_certs=False
vmware_guest_facts=yes
register: result
until: result.hw_power_status == "POWERED OFF"
retries: 10
delay: 5
i tried with
result.hw_power_status == "POWERED OFF"
and
result.ansible_facts.hw_power_status == "POWERED OFF"
both fail with a same error..
Regards
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/17584e0c-9748-486c-a02f-92efb0b420dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.