Hi,
I am experiencing the same thing. I just have localhost set up in my hosts file on Ubuntu, and when I try:
$ ansible local -a “/usr/bin/whoami” -u ubuntu -s -D
It hangs until I CTRL-C and get the following output:
^CTraceback (most recent call last):
File “/home/ubuntu/ansible/bin/ansible”, line 170, in
(runner, results) = cli.run(options, args)
File “/home/ubuntu/ansible/bin/ansible”, line 102, in run
return (runner, runner.run())
File “/home/ubuntu/ansible/lib/ansible/runner.py”, line 715, in run
results = self._parallel_exec(hosts)
File “/home/ubuntu/ansible/lib/ansible/runner.py”, line 673, in _parallel_exec
while not result_queue.empty():
File “”, line 2, in empty
File “/usr/lib/python2.7/multiprocessing/managers.py”, line 755, in _callmethod
self._connect()
File “/usr/lib/python2.7/multiprocessing/managers.py”, line 742, in _connect
conn = self._Client(self._token.address, authkey=self._authkey)
File “/usr/lib/python2.7/multiprocessing/connection.py”, line 169, in Client
c = SocketClient(address)
File “/usr/lib/python2.7/multiprocessing/connection.py”, line 289, in SocketClient
s.connect(address)
File “/usr/lib/python2.7/socket.py”, line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 2] No such file or directory
I think ansible is just trying to do this isn’t it?
$ ssh ubuntu@127.0.0.1 sudo whoami
root
Which works fine without password entry.
Any ideas what would be causing the “-s” option to hang?
I really don’t want to allow SSHing as root, so this option needs to work before I can really get into using ansible.
Thanks,
Peter