Unable to use vmware_guest Module

Hi all,

i´ve got problems running vmware_guest Module in AWX.

I´m also running a test-license for official tower where vmware_guest module is working as expected (same ansible and python version as awx system)
Running the playbook via commandline (without tower or awx) everything work fine! It also work via ansible tower.

Some Details:

System OS
(where here the Docker Engine is running: )

[root@test ~]# cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core)

Kernel:

[root@test ~]# uname -r
3.10.0-693.2.2.el7.x86_64

→ Also tried Kernel

Docker Version:

[root@test ~]# docker --version
Docker version 17.09.0-ce, build afdb6d4

Ansible Version:

[root@test ~]# ansible --version
ansible 2.3.2.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]

Python-Version
[root@lvast-anto2 ~]# python --version
Python 2.7.5

AWX
https://github.com/ansible/awx/blob/devel/INSTALL.md

→ Configured via git clone. Just map playbook directory into docker container.

What i´ve already tested without any success:
Kernel Update to 4.13.5-1.el7.elrepo.x86_64 (still Centos7)

Change OS to Ubuntu 17.04 (kernel 4.10.0-19-generic)
Python Update to 3.6.3
Ansible Update to 2.4.0

TestPlaybook:

  • hosts: all
    name: TEST
    tasks:
  • name: test_vm
    vmware_guest:
    hostname: “vCenterName”
    name: “VMNAME”
    password: “Password”
    username: “loginname and domain”
    datacenter: “ESXTEST”
    state: “poweredon”
    validate_certs: false

Inventory = Centos where the Docker Container are running
AWX Output (connection debug)

ansible-playbook 2.4.0.0
2
config file = /etc/ansible/ansible.cfg
3
configured module search path = [u’/var/lib/awx/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
4
ansible python module location = /usr/lib/python2.7/site-packages/ansible
5
executable location = /usr/bin/ansible-playbook
6
python version = 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]
7
Using /etc/ansible/ansible.cfg as config file
8
SSH password:
9
setting up inventory plugins
10
Parsed /usr/lib/python2.7/site-packages/awx/plugins/inventory/awxrest.py inventory source with script plugin
11
Loading callback plugin awx_display of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/init.pyc
12
13
PLAYBOOK: control_vm_commandline_test.yml **************************************
14
1 plays in control_vm_commandline_test.yml
15
16
PLAY [TEST] ********************************************************************10:47:18
17
18
TASK [Gathering Facts] *********************************************************10:47:18
19
Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/setup.py
20
ESTABLISH SSH CONNECTION FOR USER: root
21
SSH: EXEC sshpass -d12 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_109__bq_ml/cp/%h%p%r lvast-anto2 ‘/bin/sh -c ‘"’“‘echo ~ && sleep 0’”’“‘’
22
(0, ‘/root\n’, 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket “/tmp/awx_109__bq_ml/cp/lvast-anto222root” does not exist\r\ndebug2: resolving “lvast-anto2” port 22\r\ndebug2: ssh_connect_direct: needpriv 0\r\ndebug1: Connecting to lvast-anto2 [10.50.100.92] port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 10000 ms remain after connect\r\ndebug1: permanently_set_uid: 0/0\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /root/.ssh/id_rsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /root/.ssh/id_rsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /root/.ssh/id_dsa type -1\r\ndebug1: key_load_public: No …
23
ESTABLISH SSH CONNECTION FOR USER: root
24
SSH: EXEC sshpass -d12 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_109__bq_ml/cp/%h%p%r lvast-anto2 '/bin/sh -c '”‘"’( umask 77 && mkdir -p “echo /root/.ansible/tmp/ansible-tmp-1507798039.1-212401339719208” && echo ansible-tmp-1507798039.1-212401339719208=“echo /root/.ansible/tmp/ansible-tmp-1507798039.1-212401339719208” ) && sleep 0’“'”‘’
25
(0, ‘ansible-tmp-1507798039.1-212401339719208=/root/.ansible/tmp/ansible-tmp-1507798039.1-212401339719208\n’, ‘OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 4770\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n’)
26
PUT /tmp/tmpbQ8n0d TO /root/.ansible/tmp/ansible-tmp-1507798039.1-212401339719208/setup.py
27
SSH: EXEC sshpass -d12 sftp -o BatchMode=no -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_109__bq_ml/cp/%h%p%r ‘[lvast-anto2]’
28
(0, ‘sftp> put /tmp/tmpbQ8n0d /root/.ansible/tmp/ansible-tmp-1507798039.1-212401339719208/setup.py\n’, ‘OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 4770\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension “posix-rename@openssh.com” revision 1\r\ndebug2: Server supports extension “statvfs@openssh.com” revision 2\r\ndebug2: Server supports extension “fstatvfs@openssh.com” revision 2\r\ndebug2: S…
29
ESTABLISH SSH CONNECTION FOR USER: root
30
SSH: EXEC sshpass -d12 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_109__bq_ml/cp/%h%p%r lvast-anto2 ‘/bin/sh -c ‘"’“‘chmod u+x /root/.ansible/tmp/ansible-tmp-1507798039.1-212401339719208/ /root/.ansible/tmp/ansible-tmp-1507798039.1-212401339719208/setup.py && sleep 0’”’"’’
31
(0, ‘’, ‘OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for \r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 4770\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n’)
32
ESTABLISH SSH CONNECTION FOR USER: root
33
SSH: EXEC sshpass -d12 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_109__bq_ml/cp/%h%p%r -tt lvast-anto2 ‘/bin/sh -c ‘"’"’/usr/bin/python /root/.ansible/tmp/ansible-tmp-1507798039.1-212401339719208/setup.py; rm -rf “/root/.ansible/tmp/ansible-tmp-1507798039.1-212401339719208/” > /dev/null 2>&1 && sleep 0’“'”‘’
34
(0, '\r\n{“invocation”: {“module_args”: {“filter”: "
“, “gather_subset”: [“all”], “fact_path”: “/etc/ansible/facts.d”, “gather_timeout”: 10}}, “ansible_facts”: {“module_setup”: true, “ansible_distribution_version”: “7.4.1708”, “ansible_distribution_file_variety”: “RedHat”, “ansible_env”: {“LANG”: “en_US.UTF-8”, “LC_ALL”: “en_US.UTF-8”, “SHELL”: “/bin/bash”, “XDG_RUNTIME_DIR”: “/run/user/0”, “LANGUAGE”: “en_US.UTF-8”, “SHLVL”: “2”, “SSH_TTY”: “/dev/pts/3”, “HOME”: “/root”, “_”: “/usr/bin/python”, “LC_CTYPE”: “en_US.UTF-8”, “LESSOPEN”: “||/usr/bin/lesspipe.sh %s”, “PWD”: “/root”, “LOGNAME”: “root”, “USER”: “root”, “PATH”: “/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin”, “MAIL”: “/var/mail/root”, “LS_COLORS”: “”, “XDG_SESSION_ID”: “1693”, “SSH_CLIENT”: “172.17.0.6 40364 22”, “SSH_CONNECTION”: “172.17.0.6 40364 10.50.100.92 22”}, “ansible_userspace_bits”: “64”, “ansible_architecture”: “x86_64”, “ansible_default_ipv4”: {“macaddress”: “00:50:56:ab:55:b7”, “network”: “10.50.0.0”, “mtu”: 150…
35
ok: [lvast-anto2]
36
META: ran handlers
37
38
TASK [reboot vm] ***************************************************************10:47:21
39
task path: /var/lib/awx/projects/vmware/control_vm_commandline_test.yml:510:47:21
40
Using module file /usr/lib/python2.7/site-packages/ansible/modules/cloud/vmware/vmware_guest.py
41
ESTABLISH SSH CONNECTION FOR USER: root
42
SSH: EXEC sshpass -d12 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_109__bq_ml/cp/%h%p%r lvast-anto2 '/bin/sh -c '”’“‘echo ~ && sleep 0’”‘"’’
43
(0, ‘/root\n’, ‘OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 4770\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n’)
44
ESTABLISH SSH CONNECTION FOR USER: root
45
SSH: EXEC sshpass -d12 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_109__bq_ml/cp/%h%p%r lvast-anto2 ‘/bin/sh -c ‘"’"’( umask 77 && mkdir -p “echo /root/.ansible/tmp/ansible-tmp-1507798041.51-240959622843631” && echo ansible-tmp-1507798041.51-240959622843631=“echo /root/.ansible/tmp/ansible-tmp-1507798041.51-240959622843631” ) && sleep 0’“'”‘’
46
(0, ‘ansible-tmp-1507798041.51-240959622843631=/root/.ansible/tmp/ansible-tmp-1507798041.51-240959622843631\n’, ‘OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 4770\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n’)
47
PUT /tmp/tmpJC_XAo TO /root/.ansible/tmp/ansible-tmp-1507798041.51-240959622843631/vmware_guest.py
48
SSH: EXEC sshpass -d12 sftp -o BatchMode=no -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_109__bq_ml/cp/%h%p%r ‘[lvast-anto2]’
49
(0, ‘sftp> put /tmp/tmpJC_XAo /root/.ansible/tmp/ansible-tmp-1507798041.51-240959622843631/vmware_guest.py\n’, ‘OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 4770\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension “posix-rename@openssh.com” revision 1\r\ndebug2: Server supports extension “statvfs@openssh.com” revision 2\r\ndebug2: Server supports extension “fstatvfs@openssh.com” revision 2\r\nd…
50
ESTABLISH SSH CONNECTION FOR USER: root
51
SSH: EXEC sshpass -d12 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_109__bq_ml/cp/%h%p%r lvast-anto2 ‘/bin/sh -c ‘"’“‘chmod u+x /root/.ansible/tmp/ansible-tmp-1507798041.51-240959622843631/ /root/.ansible/tmp/ansible-tmp-1507798041.51-240959622843631/vmware_guest.py && sleep 0’”’"’’
52
(0, ‘’, ‘OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 4770\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n’)
53
ESTABLISH SSH CONNECTION FOR USER: root
54
SSH: EXEC sshpass -d12 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_109__bq_ml/cp/%h%p%r -tt lvast-anto2 ‘/bin/sh -c ‘"’"’/usr/bin/python /root/.ansible/tmp/ansible-tmp-1507798041.51-240959622843631/vmware_guest.py; rm -rf “/root/.ansible/tmp/ansible-tmp-1507798041.51-240959622843631/” > /dev/null 2>&1 && sleep 0’“'”‘’
55
(0, ‘Traceback (most recent call last):\r\n File “/tmp/ansible_P0OklM/ansible_module_vmware_guest.py”, line 1503, in \r\n main()\r\n File “/tmp/ansible_P0OklM/ansible_module_vmware_guest.py”, line 1494, in main\r\n result = pyv.deploy_vm()\r\n File “/tmp/ansible_P0OklM/ansible_module_vmware_guest.py”, line 1189, in deploy_vm\r\n dcpath = compile_folder_path_for_object(datacenter)\r\n File “/tmp/ansible_P0OklM/ansible_modlib.zip/ansible/module_utils/vmware.py”, line 237, in compile_folder_path_for_object\r\nAttributeError: 'NoneType' object has no attribute 'name'\r\n’, 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_requ…
56
fatal: [lvast-anto2]: FAILED! => {
57
“changed”: false,
58
“failed”: true,
59
“module_stderr”: “OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 4770\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to lvast-anto2 closed.\r\n”,
60
“module_stdout”: "Traceback (most recent call last):\r\n …
64
65
PLAY RECAP *********************************************************************10:47:23
66
lvast-anto2 : ok=1 changed=0 unreachable=0 failed=1
67

Json Output

{
“_ansible_parsed”: false,
“_ansible_no_log”: false,
“module_stderr”: “OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 4770\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to lvast-anto2 closed.\r\n”,
“changed”: false,
“module_stdout”: “Traceback (most recent call last):\r\n File "/tmp/ansible_P0OklM/ansible_module_vmware_guest.py", line 1503, in \r\n main()\r\n File "/tmp/ansible_P0OklM/ansible_module_vmware_guest.py", line 1494, in main\r\n result = pyv.deploy_vm()\r\n File "/tmp/ansible_P0OklM/ansible_module_vmware_guest.py", line 1189, in deploy_vm\r\n dcpath = compile_folder_path_for_object(datacenter)\r\n File "/tmp/ansible_P0OklM/ansible_modlib.zip/ansible/module_utils/vmware.py", line 237, in compile_folder_path_for_object\r\nAttributeError: ‘NoneType’ object has no attribute ‘name’\r\n”,
“failed”: true,
“rc”: 0,
“msg”: “MODULE FAILURE”
}

Does somebdoy has any idea how to fix?

Kind regards,
Christian

It’s worth noting that AWX is running Ansible 2.4.0 it looks like you may be running into this bug here: https://github.com/ansible/ansible/issues/29043

Hi Matt,

thanks.

Doesnt the official Tower version also runs with ansible 2.4.0?

It depends on what you choose to install and when you installed it

Hi,

there is no awx using Ansible 2.4.1 at the moment, right?
Update ansible on executing Host (not awx) doesnt help too?!

Thanks!

Christian

When we run image builds we pull the latest from the ansible yum repo which will pick up official releases. We build those nightly. iirc 2.4.1 is still in rc. Once it hits stable it’ll be published to the yum repo and we’ll pick it up during that nightly build.

Ok Matt, thank you!

Christian

Hi,

today i have installed awx using ansible version 2.4.1.
Sadly there are still errors trying to use vmware_guest Module…

Executing Host: Debian 9.1, Kernel 4.9.0-4-amd64

root@test:/opt/ansible/projects/vmware# ansible --version
ansible 2.5.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u’/root/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170118]
root@test:/opt/ansible/projects/vmware#

AWX Version:

[root@awx awx]# cat .tower_version
1.0.1.120
[root@awx awx]#

[root@awx awx]# ansible --version
ansible 2.4.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u’/root/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]
[root@awx awx]#

Template output:

Identity added: /tmp/awx_124_PG_K1p/credential_7 (/tmp/awx_124_PG_K1p/credential_7)

2
ansible-playbook 2.4.1.0

3
config file = /etc/ansible/ansible.cfg

4
configured module search path = [u’/var/lib/awx/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]

5
ansible python module location = /usr/lib/python2.7/site-packages/ansible

6
executable location = /usr/bin/ansible-playbook

7
python version = 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]

8
Using /etc/ansible/ansible.cfg as config file

9
setting up inventory plugins

10
Parsed /tmp/awx_124_PG_K1p/inventory inventory source with script plugin

11
Loading callback plugin awx_display of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/init.pyc

12

13
PLAYBOOK: control_vm_commandline_test.yml **************************************

14
1 plays in control_vm_commandline_test.yml

15

16
PLAY [TEST] ********************************************************************
12:52:49

17

18
TASK [Gathering Facts] *********************************************************
12:52:50

19
Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/setup.py

20
ESTABLISH SSH CONNECTION FOR USER: root

21
SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_124_PG_K1p/cp/%h%p%r lvasp-awx1 ‘/bin/sh -c ‘"’“‘echo ~ && sleep 0’”’"‘’

22
(0, ‘/root\n’, 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket “/tmp/awx_124_PG_K1p/cp/lvasp-awx122root” does not exist\r\ndebug2: resolving “lvasp-awx1” port 22\r\ndebug2: ssh_connect_direct: needpriv 0\r\ndebug1: Connecting to lvasp-awx1 [10.50.15.235] port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 9995 ms remain after connect\r\ndebug1: permanently_set_uid: 0/0\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /root/.ssh/id_rsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /root/.ssh/id_rsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /root/.ssh/id_dsa type -1\r\ndebug1: key_load_public: No such …

23
ESTABLISH SSH CONNECTION FOR USER: root

24
SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_124_PG_K1p/cp/%h%p%r lvasp-awx1 ‘/bin/sh -c ‘"’"’( umask 77 && mkdir -p “echo /root/.ansible/tmp/ansible-tmp-1509364370.37-150273059436073” && echo ansible-tmp-1509364370.37-150273059436073=“echo /root/.ansible/tmp/ansible-tmp-1509364370.37-150273059436073” ) && sleep 0’“'”‘’

25
(0, ‘ansible-tmp-1509364370.37-150273059436073=/root/.ansible/tmp/ansible-tmp-1509364370.37-150273059436073\n’, ‘OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 289\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n’)

26
PUT /tmp/tmpqYuG4H TO /root/.ansible/tmp/ansible-tmp-1509364370.37-150273059436073/setup.py

27
SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_124_PG_K1p/cp/%h%p%r ‘[lvasp-awx1]’

28
(0, ‘sftp> put /tmp/tmpqYuG4H /root/.ansible/tmp/ansible-tmp-1509364370.37-150273059436073/setup.py\n’, 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 289\r\ndebug3: mux_client_request_session: session request sent\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension “posix-rename@openssh.com” revision 1\r\ndebug2: Server supports extension “statvfs@openssh.com” revision 2\r\ndebug2: Server supports extension “fstatvfs@openssh.com” revision 2\r\ndebug2: Server supports extension “hardlink@openssh.com” revision 1\r\…

29
ESTABLISH SSH CONNECTION FOR USER: root

30
SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_124_PG_K1p/cp/%h%p%r lvasp-awx1 ‘/bin/sh -c ‘"’“‘chmod u+x /root/.ansible/tmp/ansible-tmp-1509364370.37-150273059436073/ /root/.ansible/tmp/ansible-tmp-1509364370.37-150273059436073/setup.py && sleep 0’”’"‘’

31
(0, ‘’, ‘OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 289\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n’)

32
ESTABLISH SSH CONNECTION FOR USER: root

33
SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_124_PG_K1p/cp/%h%p%r -tt lvasp-awx1 ‘/bin/sh -c ‘"’"’/usr/bin/python /root/.ansible/tmp/ansible-tmp-1509364370.37-150273059436073/setup.py; rm -rf “/root/.ansible/tmp/ansible-tmp-1509364370.37-150273059436073/” > /dev/null 2>&1 && sleep 0’“'”‘’

34
(0, 'exc: 'DistributionFiles' object has no attribute 'parse_distribution_file_Archlinux'\r\n\r\n{“invocation”: {“module_args”: {“filter”: “*”, “gather_subset”: [“all”], “fact_path”: “/etc/ansible/facts.d”, “gather_timeout”: 10}}, “ansible_facts”: {“module_setup”: true, “ansible_distribution_version”: “9.1”, “ansible_distribution_file_variety”: “Debian”, “ansible_env”: {“LANG”: “de_DE.UTF-8”, “SHELL”: “/bin/bash”, “XDG_RUNTIME_DIR”: “/run/user/0”, “MAIL”: “/var/mail/root”, “SHLVL”: “1”, “SSH_TTY”: “/dev/pts/1”, “LC_CTYPE”: “en_US.UTF-8”, “PATH”: “/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin”, “PWD”: “/root”, “LOGNAME”: “root”, “USER”: “root”, “HOME”: “/root”, “LC_ALL”: “en_US.UTF-8”, “SSH_CONNECTION”: “172.17.0.6 38322 10.50.15.235 22”, “XDG_SESSION_ID”: “342”, “SSH_CLIENT”: “172.17.0.6 38322 22”, “_”: “/bin/sh”}, “ansible_userspace_bits”: “64”, “ansible_architecture”: “x86_64”, “ansible_default_ipv4”: {“macaddress”: “00:50:56:aa:74:2c”, “network”: “10.50.0.0”, “mtu”: …

35
ok: [lvasp-awx1]

36
META: ran handlers

37

38
TASK [reboot vm] ***************************************************************
12:52:51

39
task path: /var/lib/awx/projects/vmware/control_vm_commandline_test.yml:5
12:52:51

40
Using module file /usr/lib/python2.7/site-packages/ansible/modules/cloud/vmware/vmware_guest.py

41
ESTABLISH SSH CONNECTION FOR USER: root

42
SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_124_PG_K1p/cp/%h%p%r lvasp-awx1 ‘/bin/sh -c ‘"’“‘echo ~ && sleep 0’”’"‘’

43
(0, ‘/root\n’, ‘OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 289\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n’)

44
ESTABLISH SSH CONNECTION FOR USER: root

45
SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_124_PG_K1p/cp/%h%p%r lvasp-awx1 ‘/bin/sh -c ‘"’"’( umask 77 && mkdir -p “echo /root/.ansible/tmp/ansible-tmp-1509364371.7-132038655061422” && echo ansible-tmp-1509364371.7-132038655061422=“echo /root/.ansible/tmp/ansible-tmp-1509364371.7-132038655061422” ) && sleep 0’“'”‘’

46
(0, ‘ansible-tmp-1509364371.7-132038655061422=/root/.ansible/tmp/ansible-tmp-1509364371.7-132038655061422\n’, ‘OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 289\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n’)

47
PUT /tmp/tmp6Wrdhv TO /root/.ansible/tmp/ansible-tmp-1509364371.7-132038655061422/vmware_guest.py

48
SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_124_PG_K1p/cp/%h%p%r ‘[lvasp-awx1]’

49
(0, ‘sftp> put /tmp/tmp6Wrdhv /root/.ansible/tmp/ansible-tmp-1509364371.7-132038655061422/vmware_guest.py\n’, 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 289\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension “posix-rename@openssh.com” revision 1\r\ndebug2: Server supports extension “statvfs@openssh.com” revision 2\r\ndebug2: Server supports extension “fstatvfs@openssh.com” revision 2\r\ndebu…

50
ESTABLISH SSH CONNECTION FOR USER: root

51
SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_124_PG_K1p/cp/%h%p%r lvasp-awx1 ‘/bin/sh -c ‘"’“‘chmod u+x /root/.ansible/tmp/ansible-tmp-1509364371.7-132038655061422/ /root/.ansible/tmp/ansible-tmp-1509364371.7-132038655061422/vmware_guest.py && sleep 0’”’"‘’

52
(0, ‘’, ‘OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 289\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n’)

53
ESTABLISH SSH CONNECTION FOR USER: root

54
SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/tmp/awx_124_PG_K1p/cp/%h%p%r -tt lvasp-awx1 ‘/bin/sh -c ‘"’"’/usr/bin/python /root/.ansible/tmp/ansible-tmp-1509364371.7-132038655061422/vmware_guest.py; rm -rf “/root/.ansible/tmp/ansible-tmp-1509364371.7-132038655061422/” > /dev/null 2>&1 && sleep 0’“'”‘’

55
(0, ‘Traceback (most recent call last):\r\n File “/tmp/ansible_adxJMZ/ansible_module_vmware_guest.py”, line 1503, in \r\n main()\r\n File “/tmp/ansible_adxJMZ/ansible_module_vmware_guest.py”, line 1494, in main\r\n result = pyv.deploy_vm()\r\n File “/tmp/ansible_adxJMZ/ansible_module_vmware_guest.py”, line 1189, in deploy_vm\r\n dcpath = compile_folder_path_for_object(datacenter)\r\n File “/tmp/ansible_adxJMZ/ansible_modlib.zip/ansible/module_utils/vmware.py”, line 237, in compile_folder_path_for_object\r\nAttributeError: 'NoneType' object has no attribute 'name'\r\n’, 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_reque…

56
fatal: [lvasp-awx1]: FAILED! => {

57
“changed”: false,

58
“failed”: true,

59
“module_stderr”: “OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 289\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to lvasp-awx1 closed.\r\n”,

60
“module_stdout”: "Traceback (most recent call last):\r\n Fil…

64

65
PLAY RECAP *********************************************************************
12:52:53

66
lvasp-awx1 : ok=1 changed=0 unreachable=0 failed=1

{
“_ansible_parsed”: false,
“_ansible_no_log”: false,
“module_stderr”: “OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 289\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to lvasp-awx1 closed.\r\n”,
“changed”: false,
“module_stdout”: “Traceback (most recent call last):\r\n File "/tmp/ansible_adxJMZ/ansible_module_vmware_guest.py", line 1503, in \r\n main()\r\n File "/tmp/ansible_adxJMZ/ansible_module_vmware_guest.py", line 1494, in main\r\n result = pyv.deploy_vm()\r\n File "/tmp/ansible_adxJMZ/ansible_module_vmware_guest.py", line 1189, in deploy_vm\r\n dcpath = compile_folder_path_for_object(datacenter)\r\n File "/tmp/ansible_adxJMZ/ansible_modlib.zip/ansible/module_utils/vmware.py", line 237, in compile_folder_path_for_object\r\nAttributeError: ‘NoneType’ object has no attribute ‘name’\r\n”,
“failed”: true,
“rc”: 0,
“msg”: “MODULE FAILURE”
}

Wasnt the bug fixed in ansible version 2.4.1?

Or do you think thats a new problem?

Kine regards,
Christian

Hi,

is there anything new?

Christian

I don’t have any new information. It looks like you are running into the ansible core bug that we mentioned earlier? You may want to see if you can find a resolution on that side.

Hi,

just trying the new ansible 2.4.2 release on the executable system. AWX Container is uptodate to but still using ansible 2.4.1.0.

The Error is still persist.

fatal: [lvast-awx01]: FAILED! => {

“changed”: false,

“failed”: true, “module_stderr”: “OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 304\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to lvast-awx01 closed.\r\n”,

JSON Output:

{
“_ansible_parsed”: false,
“_ansible_no_log”: false,
“module_stderr”: “OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 304\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to lvast-awx01 closed.\r\n”,
“changed”: false,
“module_stdout”: “Traceback (most recent call last):\r\n File "/tmp/ansible_kHxuN7/ansible_module_vmware_guest_find.py", line 235, in \r\n main()\r\n File "/tmp/ansible_kHxuN7/ansible_module_vmware_guest_find.py", line 216, in main\r\n uuid=module.params[‘uuid’]\r\n File "/tmp/ansible_kHxuN7/ansible_module_vmware_guest_find.py", line 123, in getvm_folder_paths\r\n folderpath = compile_folder_path_for_object(vobj)\r\n File "/tmp/ansible_kHxuN7/ansible_modlib.zip/ansible/module_utils/vmware.py", line 237, in compile_folder_path_for_object\r\nAttributeError: ‘NoneType’ object has no attribute ‘name’\r\n”,
“failed”: true,
“rc”: 0,
“msg”: “MODULE FAILURE”
}

Any ideas??

Kind regards,
Christian

As I said before, you might should take this to the ansible core community to see if you can get help : https://groups.google.com/forum/#!forum/ansible-project

Hi Matt,

executing the playbook without awx (directly on the executable host via “ansible-playbook -i ”) works fine.

The issue just came out if the playbook was triggered from awx

Christian