vmware_guest module Ansible 2.7.4 on latest RHEL 7u6

Hi

I am getting the following error when I try running a playbook to create a new VM from a template. It worked before I did yum update on the control server.

The full traceback is:
Traceback (most recent call last):
File “/root/.ansible/tmp/ansible-tmp-1545052613.45-19770221069605/AnsiballZ_vmware_guest.py”, line 113, in
_ansiballz_main()
File “/root/.ansible/tmp/ansible-tmp-1545052613.45-19770221069605/AnsiballZ_vmware_guest.py”, line 105, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File “/root/.ansible/tmp/ansible-tmp-1545052613.45-19770221069605/AnsiballZ_vmware_guest.py”, line 48, in invoke_module
imp.load_module(‘main’, mod, module, MOD_DESC)
File “/tmp/ansible_vmware_guest_payload_9wfO8a/main.py”, line 2396, in
File “/tmp/ansible_vmware_guest_payload_9wfO8a/main.py”, line 2322, in main
File “/tmp/ansible_vmware_guest_payload_9wfO8a/main.py”, line 798, in init
File “/tmp/ansible_vmware_guest_payload_9wfO8a/ansible_vmware_guest_payload.zip/ansible/module_utils/vmware.py”, line 777, in init
AttributeError: ‘PyVmomiHelper’ object has no attribute ‘module’

fatal: [localhost]: FAILED! => {
“changed”: false,
“module_stderr”: “Traceback (most recent call last):\n File "/root/.ansible/tmp/ansible-tmp-1545052613.45-19770221069605/AnsiballZ_vmware_guest.py", line 113, in \n _ansiballz_main()\n File "/root/.ansible/tmp/ansible-tmp-1545052613.45-19770221069605/AnsiballZ_vmware_guest.py", line 105, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/root/.ansible/tmp/ansible-tmp-1545052613.45-19770221069605/AnsiballZ_vmware_guest.py", line 48, in invoke_module\n imp.load_module(‘main’, mod, module, MOD_DESC)\n File "/tmp/ansible_vmware_guest_payload_9wfO8a/main.py", line 2396, in \n File "/tmp/ansible_vmware_guest_payload_9wfO8a/main.py", line 2322, in main\n File "/tmp/ansible_vmware_guest_payload_9wfO8a/main.py", line 798, in init\n File "/tmp/ansible_vmware_guest_payload_9wfO8a/ansible_vmware_guest_payload.zip/ansible/module_utils/vmware.py", line 777, in init\nAttributeError: ‘PyVmomiHelper’ object has no attribute ‘module’\n”,
“module_stdout”: “”,
“msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”,
“rc”: 1
}

It looks like with the yum update, it updated Ansible to 2.7.4 as well. On another RHEL7u3 machine with Ansible 2.7.0, the same playbook runs fine.

It seems like something with the updates caused the module to not work correctly. Has anyone seen this issue and how do we resolve it?

Thank in advance.

It looks like this issue was introduced after 2.7.2, and fixed in
2.7.5: https://github.com/ansible/ansible/issues/49487.
You're right in between with 2.7.4.
So either downgrade to 2.7.2 or upgrade to 2.7.5.

DIck

I see… thanks! let me find 2.7.5 to upgrade to.

I was previously using Ansible 2.7.0 and I downgraded it back to 2.7.0 and things are working like they were now. I had another issue where it was not allowing authentication on my account for some reason, and reverting back to 2.7.0 fixed it complete.