Cleaning up after failed ansible run

Hi,

sometimes, ansible fails on a machine and leaves back running but possibly blocking and frozen processes such as

/usr/bin/python /root/.ansible/tmp/ansible-tmp-1394441713.94-63420941773266/apt

Is there a way to clean up those processes?

Also related: Ansible sometimes apparently freezes or halts when running on a client (or at least it does not return in time). Is there a way to at the very least tell which host is affected without having to CTRL-C everything and restart with -vvvv? Sometimes it would be really nice to get back some live status information without having to wait for the process to return correctly (which may not even happen at all if the process is waiting for user input).

Cheers
/rike

So, this means there is no good answer for cleaning up / ad-hoc debugging or was it just the question which was unclear? It happens regularly that ansible gets stuck on some machine (doing apt upgrades) and I don’t see any practical way of finding out even where it got stuck and why.

Cheers
/rike

There’s no mechanism for killing stuck processes other than say running pkill.

(However if you use “async” you can set a lifetime time limit for a process and it will be forcibly slain if that time limit is reached)

That’s what’s there now.

Okay. Thanks for the info. I’ll look into async.