Closed nasgust closed 4 days ago
Thanks, @nasgust for reporting this issue.
If you want to use the vsphere schema, the properties parameter also needs.
The following is a sample playbook to get cluster name with properties parameter.
---
- hosts: localhost
gather_facts: false
tasks:
- name: Gather cluster info from given datacenter
community.vmware.vmware_cluster_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
validate_certs: false
datacenter: DC
show_tag: true
schema: vsphere
properties:
- name
register: cluster_info
- debug: var=cluster_info
I think it's a bug that the python errors are displayed, so I'll work on fixing it.
I seem that this issue probably is a bug of SDK(pyvmomi).
I found same the issue in the pyVmomi issues.
Thanks @sky-joker, unfortunately pyvmomi issue is open for 3 months without any response.
@nasgust
Yes :(
I have tried several ways against the module to resolve this issue, but I can't resolve it yet.
What I found out while trying is that if an object has an invalid property, the property can't remove from the object. (the property read-only)
(I thought that the object can parse to JSON by removing the invalid property from the object, but...)
So the error occurs every time when parsing to JSON.
1.x is EOL. Anyway, this module has been moved to vmware.vmware
recently: ansible-collections/vmware.vmware#80
So we'll deprecate this soon. I don't think we'll work on this, especially since there are so many open issues and PRs on current versions and modules that haven't been migrated to vmware.vmware
.
SUMMARY
vmware_cluster_info returns an error:
ISSUE TYPE
COMPONENT NAME
vmware_cluster_info
ANSIBLE VERSION
PYVMOMI VERSION
COLLECTION VERSION
VSPHERE API VERSION:
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
Standard module output instead of an error.
ACTUAL RESULTS