I have a main ansible playbook site.yml which includes three books one for webservers, one for dbservers, one for others.
Each has their own selection crietia specified in their own files e.g hosts:tag_name_webapp1 and similar. The issue is, if all hosts in web servers fail, ansible stops execution then and there. I want it to continue with the tasks in dbservers and so on.
1
votes
1 Answers
4
votes
If you want to continue on to the next task after one fails, you can use ignore_errors
.
https://docs.ansible.com/playbooks_error_handling.html#ignoring-failed-commands
ansible-playbook site.yml --skip-tags "webservers"
) – AHT