You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.
Recent code re-factoring of the core Ansible vmware module utils has removed the find_cluster_by_name_datacenter function resulting in the following error when using the vmware_gather_moids module in this repo.
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NameError: global name 'find_cluster_by_name_datacenter' is not defined
fatal: [host.lab.home.local]: FAILED! => changed=false
module_stderr: |-
Traceback (most recent call last):
File "/home/rich/.ansible/tmp/ansible-tmp-1543383966.18-177345832560939/AnsiballZ_vcenter_gather_moids.py", line 113, in <module>
_ansiballz_main()
File "/home/rich/.ansible/tmp/ansible-tmp-1543383966.18-177345832560939/AnsiballZ_vcenter_gather_moids.py", line 105, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/rich/.ansible/tmp/ansible-tmp-1543383966.18-177345832560939/AnsiballZ_vcenter_gather_moids.py", line 48, in invoke_module
imp.load_module('__main__', mod, module, MOD_DESC)
File "/tmp/ansible_vcenter_gather_moids_payload_mQjtSO/__main__.py", line 97, in <module>
File "/tmp/ansible_vcenter_gather_moids_payload_mQjtSO/__main__.py", line 81, in main
NameError: global name 'find_cluster_by_name_datacenter' is not defined
module_stdout: ''
msg: |-
MODULE FAILURE
See stdout/stderr for the exact error
rc: 1
The text was updated successfully, but these errors were encountered:
In case your curious, I was able to get it to work with Ansible 2.8. by making the following changes to vcenter_gather_moids.py
change:
if searched_parameter == 'cluster_name' and module.params[searched_parameter]:
object_mo = find_cluster_by_name_datacenter(datacenter_mo, module.params[searched_parameter])
to
if searched_parameter == 'cluster_name' and module.params[searched_parameter]:
object_mo = find_cluster_by_name(content, module.params[searched_parameter], datacenter_mo)
I should probably shoot PR :)
jpiron
added a commit
to jpiron/nsxansible
that referenced
this issue
Nov 3, 2020
Recent code re-factoring of the core Ansible vmware module utils has removed the
find_cluster_by_name_datacenter
function resulting in the following error when using the vmware_gather_moids module in this repo.The text was updated successfully, but these errors were encountered: