Hi - When I execute the vmware_guest_info module without the ‘properties’ parameter, the task succeeds and a subsequent debug/msg shows the expected output:
"msg": "The vm_info output is {'instance': {'_vimid': 'vm-40213', '_vimref': 'vim.VirtualMachine:vm-40213', '_vimtype': 'vim.VirtualMachine', 'alarmActionsEnabled': True . . .
But when I try to use the vmware_guest_info ‘properties’ parameter as described in the documentation, the debug/msg always returns:
fatal: [ldpdd196.hop.lab.emc.com → localhost]: FAILED! => {“changed”: false, “msg”: “Property ‘_vimid’ not found.”}
I’ve tried all the combinations of defining the ‘properties’ value that I can think of (square brackets, quotes, etc.), but nothing works. It doesn’t help that the sample ‘Return Values’ in the documentation does not match the values used in the Examples.
- name: Retrieve VM information
community.vmware.vmware_guest_info:
hostname: "{{ management_vcenter_ip }}"
validate_certs: false
username: "{{ management_vcenter_user }}"
password: "{{ management_vcenter_password }}"
datacenter: "{{ datacenter }}"
folder: "{{ vm_folder }}"
name: "{{ vm_name }}"
schema: vsphere
properties: ["_vimid"]
delegate_to: localhost
register: vm_info
- debug:
msg: "The vm_info output is {{ vm_info }}"
Thoughts, please! Thanks!