I'm trying to run a simple playbook (actually it's another one, but I
created that for tests), but it keep giving me the error below in any
server I've tried:
---
- hosts: ideia3
tasks:
- shell: whoami
$ ansible-playbook test.yml -i production/inventory --user=inadmin
--ask-pass --su --ask-su-pass -vvvv
SSH password:
su password:
PLAY [server3]
*****************************************************************
TASK: [shell whoami]
**********************************************************
<mail.server3.com> ESTABLISH CONNECTION FOR USER: inadmin
<mail.server3.com> REMOTE_MODULE command whoami #USE_SHELL
<mail.server3.com> EXEC sshpass -d4 ssh -C -tt -vvv -o ControlMaster=auto
-o ControlPersist=60s -o
ControlPath="/home/kessia/.ansible/cp/ansible-ssh-%h-%p-%r" -o Port=5822 -o
GSSAPIAuthentication=no -o PubkeyAuthentication=no -o User=inadmin -o
ConnectTimeout=10 mail.server3.com /bin/sh -c 'mkdir -p
$HOME/.ansible/tmp/ansible-tmp-1421252635.58-1623863376681 && chmod a+rx
$HOME/.ansible/tmp/ansible-tmp-1421252635.58-1623863376681 && echo
$HOME/.ansible/tmp/ansible-tmp-1421252635.58-1623863376681'
<mail.server3.com> PUT /tmp/tmpSw53ph TO
/home/inadmin/.ansible/tmp/ansible-tmp-1421252635.58-1623863376681/command
<mail.server3.com> EXEC sshpass -d4 ssh -C -tt -vvv -o ControlMaster=auto
-o ControlPersist=60s -o
ControlPath="/home/kessia/.ansible/cp/ansible-ssh-%h-%p-%r" -o Port=5822 -o
GSSAPIAuthentication=no -o PubkeyAuthentication=no -o User=inadmin -o
ConnectTimeout=10 mail.server3.com /bin/sh -c 'su root -c "/bin/sh -c
'"'"'echo SUDO-SUCCESS-wvyzlalvnjhasqemychsrmkysnhzkbsv; LANG=C LC_CTYPE=C
/usr/bin/python
/home/inadmin/.ansible/tmp/ansible-tmp-1421252635.58-1623863376681/command;
rm -rf /home/inadmin/.ansible/tmp/ansible-tmp-1421252635.58-1623863376681/
>/dev/null 2>&1'"'"'"'
fatal: [server3] => Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/ansible/runner/__init__.py", line
590, in _executor
exec_rc = self._executor_internal(host, new_stdin)
File "/usr/lib/python2.7/site-packages/ansible/runner/__init__.py", line
792, in _executor_internal
return self._executor_internal_inner(host, self.module_name,
self.module_args, inject, port, complex_args=complex_args)
File "/usr/lib/python2.7/site-packages/ansible/runner/__init__.py", line
1025, in _executor_internal_inner
result = handler.run(conn, tmp, module_name, module_args, inject,
complex_args)
File
"/usr/lib/python2.7/site-packages/ansible/runner/action_plugins/normal.py",
line 57, in run
return self.runner._execute_module(conn, tmp, module_name, module_args,
inject=inject, complex_args=complex_args)
File "/usr/lib/python2.7/site-packages/ansible/runner/__init__.py", line
553, in _execute_module
res = self._low_level_exec_command(conn, cmd, tmp, su=True,
in_data=in_data)
File "/usr/lib/python2.7/site-packages/ansible/runner/__init__.py", line
1166, in _low_level_exec_command
in_data=in_data)
File
"/usr/lib/python2.7/site-packages/ansible/runner/connection_plugins/ssh.py",
line 337, in exec_command
elif sudo_errput.endswith(prompt):
TypeError: endswith first arg must be str, unicode, or tuple, not NoneType
FATAL: all hosts have already failed -- aborting
PLAY RECAP
********************************************************************
to retry, use: --limit @/home/kessia/test.retry
server3 : ok=0 changed=0 unreachable=1
failed=0
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/e22c5c6e-0861-4320-a751-381ce9e28a60%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.