When writing and debugging Ansible playbooks, typical workflow is as follows:
ansible-playbook ./main.yaml
Future readers:
The --limit @/home/user/site.retry
would not help in such a scenario, the .retry
only stores the failed host and nothing more, so will just execute all tasks against failed hosts.
If you are using the latest version (Ansible 2.x) the --start-at-task
does not work for tasks defined inside roles
.
You can achieve similar effect by just using the --step
flag e.g: ansible-playbook playbook.yml --step
. The step asks you on before executing each task and you could choose (N)o/(y)es/(c)ontinue
.
With this approach you selectively execute tasks when needed and also continue from point where it failed, after fixes.