Refine deploy workflow

You can find locked resources from a task, look at the models in foreman-tasks pls.