2

My Ansible install on CentOS 6.5 throws OSError: [Errno 2] No such file or directory

[batandwa@localhost ansible]$ ansible-playbook -i hosts main.yml -v
 [WARNING]: The version of gmp you have installed has a known issue regarding
timing vulnerabilities when used with pycrypto. If possible, you should update
it (ie. yum update gmp).


PLAY [all] ********************************************************************

GATHERING FACTS ***************************************************************
Traceback (most recent call last):
  File "/usr/bin/ansible-playbook", line 317, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/bin/ansible-playbook", line 257, in main
    pb.run()
  File "/usr/lib/python2.6/site-packages/ansible/playbook/__init__.py", line 323, in run
    if not self._run_play(play):
  File "/usr/lib/python2.6/site-packages/ansible/playbook/__init__.py", line 624, in _run_play
    self._do_setup_step(play)
  File "/usr/lib/python2.6/site-packages/ansible/playbook/__init__.py", line 569, in _do_setup_step
    accelerate_port=play.accelerate_port,
  File "/usr/lib/python2.6/site-packages/ansible/runner/__init__.py", line 204, in __init__
    cmd = subprocess.Popen(['ssh','-o','ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib64/python2.6/subprocess.py", line 642, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.6/subprocess.py", line 1234, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

The folder I'm running this from contains hosts, main.yml and variables.yml.

Even ansible -i hosts all -m ping doesn't work and returns the same error.

2 Answers 2

3

Based on a comment on the Ansible Project group on Google, installing openssh-clients fixed this for me:

sudo yum install openssh-clients
2
  • This fix from that thread is for a completely different problem and doesn't fix the OPs problem at all.
    – mpeters
    Oct 9, 2014 at 13:56
  • While the above comment may be true, the logs in the question don't seem to be verbose enough to determine what is going on. I enable -vvv for ansible logging and saw the command executed at this point was ssh and was indeed not installed. It's worth checking. Nov 9, 2017 at 9:38
0

It's a problem with the EPEL packages on CentOS 6. It's an old dependency of a dependency of ansible that might break other things if upgraded, so not sure there's anything that will be done about it in EPEL.

See https://bugzilla.redhat.com/show_bug.cgi?id=1103566

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .