I have a host that, when I run a playbook against it, it fails at gathering facts. Unfortunately, it just hangs:
ansible-playbook -i test playbooks/get_release_versions/site.yml -f 10 -vvvv
PLAY [Grabs all release versions for auditing purposes] ***********************
GATHERING FACTS ***************************************************************
ESTABLISH CONNECTION FOR USER: ddecker
EXEC [‘ssh’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘Port=22’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ddecker’, ‘-o’, ‘ConnectTimeout=10’, ‘testhost01’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-1386355046.1-188203869680440 && chmod a+rx $HOME/.ansible/tmp/ansible-1386355046.1-188203869680440 && echo $HOME/.ansible/tmp/ansible-1386355046.1-188203869680440’”]
REMOTE_MODULE setup
PUT /tmp/tmpEvKhjU TO /home/ddecker/.ansible/tmp/ansible-1386355046.1-188203869680440/setup
EXEC [‘ssh’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘Port=22’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ddecker’, ‘-o’, ‘ConnectTimeout=10’, ‘testhost01’, ‘/bin/sh -c 'dzdo -k && dzdo -H -S -p “[sudo via ansible, key=eeszsiqmrnksgtzkolmtvmhddnepwrbh] password: " -u root /bin/sh -c '”'“'/usr/bin/python /home/ddecker/.ansible/tmp/ansible-1386355046.1-188203869680440/setup; rm -rf /home/ddecker/.ansible/tmp/ansible-1386355046.1-188203869680440/ >/dev/null 2>&1'”'"''’]
^CTraceback (most recent call last):
File “/usr/bin/ansible-playbook”, line 268, in
sys.exit(main(sys.argv[1:]))
File “/usr/bin/ansible-playbook”, line 208, in main
pb.run()
File “/usr/lib/python2.6/site-packages/ansible/playbook/init.py”, line 262, in run
if not self._run_play(play):
File “/usr/lib/python2.6/site-packages/ansible/playbook/init.py”, line 505, in _run_play
self._do_setup_step(play)
File “/usr/lib/python2.6/site-packages/ansible/playbook/init.py”, line 452, in _do_setup_step
accelerate=play.accelerate, accelerate_port=play.accelerate_port,
File “/usr/lib/python2.6/site-packages/ansible/runner/init.py”, line 968, in run
results = [ self._executor(h, None) for h in hosts ]
File “/usr/lib/python2.6/site-packages/ansible/runner/init.py”, line 382, in _executor
exec_rc = self._executor_internal(host, new_stdin)
File “/usr/lib/python2.6/site-packages/ansible/runner/init.py”, line 471, 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.6/site-packages/ansible/runner/init.py”, line 659, in _executor_internal_inner
result = handler.run(conn, tmp, module_name, module_args, inject, complex_args)
File “/usr/lib/python2.6/site-packages/ansible/runner/action_plugins/normal.py”, line 54, in run
return self.runner._execute_module(conn, tmp, module_name, module_args, inject=inject, complex_args=complex_args)
File “/usr/lib/python2.6/site-packages/ansible/runner/init.py”, line 348, in _execute_module
res = self._low_level_exec_command(conn, cmd, tmp, sudoable=sudoable)
File “/usr/lib/python2.6/site-packages/ansible/runner/init.py”, line 708, in _low_level_exec_command
rc, stdin, stdout, stderr = conn.exec_command(cmd, tmp, sudo_user, sudoable=sudoable, executable=executable)
File “/usr/lib/python2.6/site-packages/ansible/runner/connection_plugins/ssh.py”, line 219, in exec_command
rfd, wfd, efd = select.select([p.stdout, p.stderr], , [p.stdout, p.stderr], 1)
KeyboardInterrupt
For the above, I wait more than 10 minutes and it still just hangs. If I REMOVE the host, then it proceeds (and completes all other hosts). Additionall if I add gather_facts: False to my site.yml (for the playbook), it completes with no issue:
ansible-playbook -i test playbooks/get_release_versions/site.yml -f 10
PLAY [Grabs all release versions for auditing purposes] ***********************
TASK: [Get release version] ***************************************************
changed: [testhost01]
PLAY RECAP ********************************************************************
testhost01 : ok=1 changed=1 unreachable=0 failed=0
Does anyone know why this happens or what I can do to better debug and find out the reason why? When I do a ansible all -u ddecker -m setup it processes all hosts except this one, so it has something to do with the host and something that is happening that the fact gathering is requesting.
Thanks,
Drew