-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vmware_vm_info module throws AttributeError: 'NoneType' object has no attribute 'datastoreUrl' #1407
Comments
Files identified in the description: If these files are inaccurate, please update the |
Thanks for reporting this @homandr! I've opened a PR to fix it, just didn't find the time to test it yet. One minor point, though. community.vmware/plugins/module_utils/vmware.py Lines 400 to 408 in 19b8ffe
This might be a bit misleading for someone reading and trying to understand the code. Therefor, I'm using community.vmware/plugins/modules/vmware_vm_info.py Lines 309 to 311 in 19b8ffe
|
Thanks for fixing it and educating me in the process :) |
SUMMARY
Module
vmware_vm_info
chokes on objects without datastoreUrl attribute. Most likely this is not an issue under normal circumstances, and the playbook worked for me in the past. It took some time to figure out our vCenter had a couple of inaccessible VMs, which obviously don't have a lot of attributes.I barely know anything about Python but was able to fix the issue based on examples of similar past issues.
ISSUE TYPE
COMPONENT NAME
vmware_vm_info
ANSIBLE VERSION
COLLECTION VERSION
STEPS TO REPRODUCE
EXPECTED RESULTS
Get a list of all VMs.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: