Run all of `site.yaml` playbook

I have a playbook (site.yaml) which calls the other main playbooks (infra1.yaml, infra2.yaml` etc.), which looks like

- import_playbook: infra1.yaml
- import_playbook: infra2.yaml
- import_playbook: infra3.yaml

Is it possible to have ansible go through all the imports and run them, even if an earlier playbook errors i.e. if infra1.yaml errors, infra2.yaml and infra3.yaml are still run?

I’d start with looking at error handling. This can help you either define what “failed” means, or ignore it completely when you need to.

2 Likes