LMSouq
general-dev Open

How to detect why Ansible playbook hangs during execution

DE
dev9
1 month ago
3 views
Problem Description
Some of tasks I wrote start and never end. Ansible does not provide any errors or logs that would explain this, even with -vvvv option. Playbook just hangs and passing hours doesn't change anything. When I try to run my tasks manually (by entering commands via SSH) everything is fine. Example task that hangs: - name: apt upgrade shell: apt-get upgrade Is there any way to see stdout and stderr ? I tried: - name: apt upgrade shell: apt-get upgrade register: hello - debug: msg="{{ hello.stdout }}" - debug: msg="{{ hello.stderr }}" but nothing changed. I do have required permissions and I pass correct sudo password - other tasks that require sudo execute correctly.

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base