Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible hangs on Task Gathering Facts #32

Closed
svh1985 opened this issue Jun 17, 2019 · 4 comments
Closed

Ansible hangs on Task Gathering Facts #32

svh1985 opened this issue Jun 17, 2019 · 4 comments

Comments

@svh1985
Copy link

svh1985 commented Jun 17, 2019

Hi there,

The Ansible script hangs on my High Sierra Mac. I'm not seeing any errors. Not sure what is wrong. I have the latest Raspbian Lite image installed and running with SSH enabled on a RPi 2B.

This is the Ansible -vvvv output:

ansible-playbook 2.8.1
  config file = None
  configured module search path = ['/Users/stephan/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/2.8.1/libexec/lib/python3.7/site-packages/ansible
  executable location = /usr/local/bin/ansible-playbook
  python version = 3.7.3 (default, Mar 27 2019, 09:23:39) [Clang 10.0.0 (clang-1000.11.45.5)]
No config file found; using defaults
SSH password:
setting up inventory plugins
host_list declined parsing /Users/stephan/Developer/hkcam/ansible/hosts as it did not pass it's verify_file() method
script declined parsing /Users/stephan/Developer/hkcam/ansible/hosts as it did not pass it's verify_file() method
auto declined parsing /Users/stephan/Developer/hkcam/ansible/hosts as it did not pass it's verify_file() method
Parsed /Users/stephan/Developer/hkcam/ansible/hosts inventory source with ini plugin
statically imported: /Users/stephan/Developer/hkcam/ansible/roles/hkcam/tasks/install.yml
statically imported: /Users/stephan/Developer/hkcam/ansible/roles/hkcam/tasks/configure.yml
statically imported: /Users/stephan/Developer/hkcam/ansible/roles/runit/tasks/install.yml
statically imported: /Users/stephan/Developer/hkcam/ansible/roles/runit/tasks/add.yml
statically imported: /Users/stephan/Developer/hkcam/ansible/roles/runit/tasks/enabled.yml
statically imported: /Users/stephan/Developer/hkcam/ansible/roles/runit/tasks/envs.yml
statically imported: /Users/stephan/Developer/hkcam/ansible/roles/runit/tasks/state.yml
Loading callback plugin default of type stdout, v2.0 from /usr/local/Cellar/ansible/2.8.1/libexec/lib/python3.7/site-packages/ansible/plugins/callback/default.py

PLAYBOOK: rpi.yml **************************************************************
Positional arguments: rpi.yml
verbosity: 4
ask_pass: True
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/Users/stephan/Developer/hkcam/ansible/hosts',)
forks: 5
1 plays in rpi.yml

PLAY [rpi] *********************************************************************

TASK [Gathering Facts] *********************************************************
task path: /Users/stephan/Developer/hkcam/ansible/rpi.yml:2
<raspberrypi.local> ESTABLISH SSH CONNECTION FOR USER: pi
<raspberrypi.local> SSH: EXEC sshpass -d43 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'User="pi"' -o ConnectTimeout=10 -o ControlPath=/Users/stephan/.ansible/cp/5fce5d2568 raspberrypi.local '/bin/sh -c '"'"'echo ~pi && sleep 0'"'"''

I have sshpass 1.06 installed:

sshpass -V
sshpass 1.06
(C) 2006-2011 Lingnu Open Source Consulting Ltd.
(C) 2015-2016 Shachar Shemesh
This program is free software, and can be distributed under the terms of the GPL
See the COPYING file for more information.

Using "assword" as the default password prompt indicator.
@brutella
Copy link
Owner

Can you ping your Raspberry Pi with ping raspberrypi.local?

@svh1985
Copy link
Author

svh1985 commented Jun 22, 2019

I can ping the RPi yes :)

PING raspberrypi.local (172.16.0.32): 56 data bytes
64 bytes from 172.16.0.32: icmp_seq=0 ttl=64 time=30.367 ms
64 bytes from 172.16.0.32: icmp_seq=1 ttl=64 time=3.803 ms
64 bytes from 172.16.0.32: icmp_seq=2 ttl=64 time=3.668 ms
64 bytes from 172.16.0.32: icmp_seq=3 ttl=64 time=4.667 ms
64 bytes from 172.16.0.32: icmp_seq=4 ttl=64 time=8.500 ms
^C
--- raspberrypi.local ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 3.668/10.201/30.367/10.235 ms

@joeycortez42
Copy link

joeycortez42 commented Oct 3, 2020

Just tried running the playbook on a fresh install of Buster List 2020-08-20 and got a sshpass error during Task Gathering. I had to sudo apt install sshpass and then I was able to get passed TASK: Gathering Facts. But then it never proceeds past that.

Yes, I can ping raspberry.local too.

I don't see a mentioned of sshpass in code. Maybe it's missing from a list of prerequisites?

UPDATE: Yeah, something is broken about the playbook. FFMpeg and v4l2loopback didn't get install.

@joeycortez42
Copy link

ansible/ansible#16894 (comment)

"Ansible doesn't support prompting for an SSH key passphrase, and hangs.
After removing the passphrase from the key and trying again, the playbook runs."

Reran ssh-keygen and ssh-copy with no passphrase and it is running.

@brutella brutella closed this as completed Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants