# hanging ad-hoc gather-facts

**URL:** <https://forum.ansible.com/t/hanging-ad-hoc-gather-facts/31116>\
**Category:** Ansible Developer\
**Created:** [August 24, 2019, 7:44am UTC](https://forum.ansible.com/t/hanging-ad-hoc-gather-facts/31116 "2019-08-24T07:44:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Libor\_Nenadal](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@Libor\_Nenadal](https://forum.ansible.com/u/Libor_Nenadal)\
**Post date:** [August 24, 2019, 7:44am UTC](https://forum.ansible.com/t/hanging-ad-hoc-gather-facts/31116/1 "2019-08-24T07:44:13Z")

</div>

Hi,  
I am trying to debug playbook that keeps hanging for one machine by running ad-hoc command on that machine:

ansible -i hosts -m setup -a ‘gather\_subset=!hardware’ rpi4

It hangs with following debug output:

1059 1566631954.85790: running TaskExecutor() for rpi4/TASK: setup  
1059 1566631954.86076: in run() - task 10653038-cb6d-2425-0465-000000000010  
1059 1566631954.86569: calling self.\_execute()  
1059 1566631955.66259: trying /usr/lib/python2.7/dist-packages/ansible/plugins/connection  
1059 1566631955.85543: Loaded config def from plugin (connection/ssh)  
1059 1566631955.85606: Loading Connection ‘ssh’ from /usr/lib/python2.7/dist-packages/ansible/plugins/connection/ssh.py  
1059 1566631955.86001: trying /usr/lib/python2.7/dist-packages/ansible/plugins/shell  
1059 1566631955.90374: Loading ModuleDocFragment ‘shell\_common’ from /usr/lib/python2.7/dist-packages/ansible/plugins/doc\_fragments/shell\_common.py  
1059 1566631955.90632: Loaded config def from plugin (shell/sh)  
1059 1566631955.90912: Loading ShellModule ‘sh’ from /usr/lib/python2.7/dist-packages/ansible/plugins/shell/sh.py  
1059 1566631955.91027: Loading ShellModule ‘sh’ from /usr/lib/python2.7/dist-packages/ansible/plugins/shell/sh.py (found\_in\_cache=True, class\_only=False)  
1059 1566631955.93928: Loading ActionModule ‘normal’ from /usr/lib/python2.7/dist-packages/ansible/plugins/action/normal.py  
1059 1566631955.94099: starting attempt loop  
1059 1566631955.94138: running the handler  
1059 1566631955.94551: \_low\_level\_execute\_command(): starting  
1059 1566631955.94600: \_low\_level\_execute\_command(): executing: /bin/sh -c ‘echo ~pi && sleep 0’  
^C 1052 1566632196.05481: RUNNING CLEANUP  
1059 1566632196.05553: WORKER HARD EXIT:  
[ERROR]: User interrupted execution

Ansible version:  
ansible 2.8.3  
config file = /etc/ansible/ansible.cfg  
configured module search path = [u’/home/libor/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/lib/python2.7/dist-packages/ansible  
executable location = /usr/bin/ansible  
python version = 2.7.15+ (default, Nov 27 2018, 23:36:35) [GCC 7.3.0]

I am new to Ansible so please excuse me if I am missing something obvious but I would appreciate any hint to move this forward. I am stuck. ☹

Thank you,  
Libor
