Let's consider following pseudo-ansible code:
- name: "some long task which can hang
- command: "something"
- timeout: 60s
- name: "catch in case of failure (in particularity timeout)"
- command: "some helpful debug command"
Is it possible to do in ansible?
Read the docs on Ansible Blocks They allow you to amongst other things do stuff like: