TASK [Join system to AD] ***************************************************************************************************
task path: /home/danbak1/git/current-playbooks/AD.yml:44
<myhost> ESTABLISH SSH CONNECTION FOR USER: root
<myhost> SSH: EXEC sshpass -d10 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/danbak1/.ansible/cp/da4efc7913"' myhost '/bin/sh -c '"'"'echo ~root && sleep 0'"'"''
<myhost> (0, b'/root\n', b'')
<myhost> ESTABLISH SSH CONNECTION FOR USER: root
<myhost> SSH: EXEC sshpass -d10 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/danbak1/.ansible/cp/da4efc7913"' myhost '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1728921680.1241539-3907961-267960157196489 `" && echo ansible-tmp-1728921680.1241539-3907961-267960157196489="` echo /root/.ansible/tmp/ansible-tmp-1728921680.1241539-3907961-267960157196489 `" ) && sleep 0'"'"''
<myhost> (0, b'ansible-tmp-1728921680.1241539-3907961-267960157196489=/root/.ansible/tmp/ansible-tmp-1728921680.1241539-3907961-267960157196489\n', b'')
Using module file /usr/lib/python3.9/site-packages/ansible/modules/expect.py
<myhost> PUT /home/danbak1/.ansible/tmp/ansible-local-3902922r0c1y55b/tmpim5ot2eu TO /root/.ansible/tmp/ansible-tmp-1728921680.1241539-3907961-267960157196489/AnsiballZ_expect.py
<myhost> SSH: EXEC sshpass -d10 sftp -o BatchMode=no -b - -C -o ControlMaster=auto -o ControlPersist=60s -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/danbak1/.ansible/cp/da4efc7913"' '[myhost]'
<myhost> (0, b'sftp> put /home/danbak1/.ansible/tmp/ansible-local-3902922r0c1y55b/tmpim5ot2eu /root/.ansible/tmp/ansible-tmp-1728921680.1241539-3907961-267960157196489/AnsiballZ_expect.py\n', b'')
<myhost> ESTABLISH SSH CONNECTION FOR USER: root
<myhost> SSH: EXEC sshpass -d10 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/danbak1/.ansible/cp/da4efc7913"' myhost '/bin/sh -c '"'"'chmod u+x /root/.ansible/tmp/ansible-tmp-1728921680.1241539-3907961-267960157196489/ /root/.ansible/tmp/ansible-tmp-1728921680.1241539-3907961-267960157196489/AnsiballZ_expect.py && sleep 0'"'"''
<myhost> (0, b'', b'')
<myhost> ESTABLISH SSH CONNECTION FOR USER: root
<myhost> SSH: EXEC sshpass -d10 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/danbak1/.ansible/cp/da4efc7913"' -tt myhost '/bin/sh -c '"'"'/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1728921680.1241539-3907961-267960157196489/AnsiballZ_expect.py && sleep 0'"'"''
<myhost> (1, b'Traceback (most recent call last):\r\n File "/tmp/ansible_expect_payload_3n1p_k08/ansible_expect_payload.zip/ansible/modules/expect.py", line 210, in main\r\nAttributeError: module \'pexpect\' has no attribute \'run\'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File "/root/.ansible/tmp/ansible-tmp-1728921680.1241539-3907961-267960157196489/AnsiballZ_expect.py", line 107, in <module>\r\n _ansiballz_main()\r\n File "/root/.ansible/tmp/ansible-tmp-1728921680.1241539-3907961-267960157196489/AnsiballZ_expect.py", line 99, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File "/root/.ansible/tmp/ansible-tmp-1728921680.1241539-3907961-267960157196489/AnsiballZ_expect.py", line 47, in invoke_module\r\n runpy.run_module(mod_name=\'ansible.modules.expect\', init_globals=dict(_module_fqn=\'ansible.modules.expect\', _modlib_path=modlib_path),\r\n File "/usr/lib64/python3.9/runpy.py", line 225, in run_module\r\n return _run_module_code(code, init_globals, run_name, mod_spec)\r\n File "/usr/lib64/python3.9/runpy.py", line 97, in _run_module_code\r\n _run_code(code, mod_globals, init_globals,\r\n File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code\r\n exec(code, run_globals)\r\n File "/tmp/ansible_expect_payload_3n1p_k08/ansible_expect_payload.zip/ansible/modules/expect.py", line 258, in <module>\r\n File "/tmp/ansible_expect_payload_3n1p_k08/ansible_expect_payload.zip/ansible/modules/expect.py", line 229, in main\r\nAttributeError: module \'pexpect\' has no attribute \'__version__\'\r\n', b'Shared connection to myhost closed.\r\n')
<myhost> Failed to connect to the host via ssh: Shared connection to myhost closed.
<myhost> ESTABLISH SSH CONNECTION FOR USER: root
<myhost> SSH: EXEC sshpass -d10 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/danbak1/.ansible/cp/da4efc7913"' myhost '/bin/sh -c '"'"'rm -f -r /root/.ansible/tmp/ansible-tmp-1728921680.1241539-3907961-267960157196489/ > /dev/null 2>&1 && sleep 0'"'"''
<myhost> (0, b'', b'')
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_expect_payload_3n1p_k08/ansible_expect_payload.zip/ansible/modules/expect.py", line 210, in main
AttributeError: module 'pexpect' has no attribute 'run'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-tmp-1728921680.1241539-3907961-267960157196489/AnsiballZ_expect.py", line 107, in <module>
_ansiballz_main()
File "/root/.ansible/tmp/ansible-tmp-1728921680.1241539-3907961-267960157196489/AnsiballZ_expect.py", line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/root/.ansible/tmp/ansible-tmp-1728921680.1241539-3907961-267960157196489/AnsiballZ_expect.py", line 47, in invoke_module
runpy.run_module(mod_name='ansible.modules.expect', init_globals=dict(_module_fqn='ansible.modules.expect', _modlib_path=modlib_path),
File "/usr/lib64/python3.9/runpy.py", line 225, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib64/python3.9/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/tmp/ansible_expect_payload_3n1p_k08/ansible_expect_payload.zip/ansible/modules/expect.py", line 258, in <module>
File "/tmp/ansible_expect_payload_3n1p_k08/ansible_expect_payload.zip/ansible/modules/expect.py", line 229, in main
AttributeError: module 'pexpect' has no attribute '__version__'
fatal: [myhost]: FAILED! => {
"changed": false,
"rc": 1
}
MSG:
MODULE FAILURE
See stdout/stderr for the exact error
MODULE_STDOUT:
Traceback (most recent call last):
File "/tmp/ansible_expect_payload_3n1p_k08/ansible_expect_payload.zip/ansible/modules/expect.py", line 210, in main
AttributeError: module 'pexpect' has no attribute 'run'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-tmp-1728921680.1241539-3907961-267960157196489/AnsiballZ_expect.py", line 107, in <module>
_ansiballz_main()
File "/root/.ansible/tmp/ansible-tmp-1728921680.1241539-3907961-267960157196489/AnsiballZ_expect.py", line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/root/.ansible/tmp/ansible-tmp-1728921680.1241539-3907961-267960157196489/AnsiballZ_expect.py", line 47, in invoke_module
runpy.run_module(mod_name='ansible.modules.expect', init_globals=dict(_module_fqn='ansible.modules.expect', _modlib_path=modlib_path),
File "/usr/lib64/python3.9/runpy.py", line 225, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib64/python3.9/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/tmp/ansible_expect_payload_3n1p_k08/ansible_expect_payload.zip/ansible/modules/expect.py", line 258, in <module>
File "/tmp/ansible_expect_payload_3n1p_k08/ansible_expect_payload.zip/ansible/modules/expect.py", line 229, in main
AttributeError: module 'pexpect' has no attribute '__version__'
MODULE_STDERR:
Shared connection to myhost closed.
And pexpect
[root@RHEL92-Template ~]# pip show pexpect
Name: pexpect
Version: 4.9.0
Summary:
Home-page:
Author:
Author-email:
License:
Location: /usr/local/lib/python3.9/site-packages
Requires:
Required-by: sos