Concerning Ansible, this should be fairly straightforwards I hope:
I have 3 servers, red, green, and blue.
I have a task created for ansible to use yum in linux to install a random package in a playbook.
In this same playbook, below the yum task are 2 other random tasks, their content is not important.
When I run this playbook, the yum task runs just fine on servers red, and green, but on blue it will hang up to 3 minutes before failing out. This is bad because it "can" hold up other plays/tasks, even if I were to utilize forks.
My goal is to find a way to force ansible to give up on a particular task if it takes more than "x" number of seconds to complete, either by closing the ssh session, or whatever, and then hopefully reporting that it failed, and/or the reason that server in the task was skipped.
This is different than ansible "waiting" for a task to complete, I can't do that in this situation because the task would never complete, and/or just take far too long to fail. Also, on subsequent runs it would still just repeat the behavior of hanging for 10 minutes. Thus, I would rather it either fail out after a timeout, or skip the task after a timeout. (preferably with a custom message.)
I've looked around in the docs and online, and can't quite find the solution I am looking for as the answer to this. Does anyone have any idea on how this might be accomplished? (No, I can't actually fix the underlying issue, that would cause a break in the policy for my customer, and I'd prefer to not have to exclude the problem servers from the run just because of this.)
Thanks in advance!