It would be tremendously useful if ansible supported timeouts for tasks, and if the task times out, then ansible outputs whatever was on stdout/stderr in the fail message.
I got bitten today because a django “manage.py migrate” command outputted the following message with a prompt:
async mode does in fact support a time-to-live for a task and will kill it after that time expires.
Does using async give you stdout/stderr of the task that got killed?
Don’t think so.
Try it.
with a shell: echo hi; sleep 10 limiting the run time to 5 sec, perhaps
There are some needs to upgrade async, to support things like intermediate status.
You were right, no output on async timeout:
failed: [server1] => {“failed”: 1, “rc”: null}
msg: timed out
FATAL: all hosts have already failed – aborting
Lorin