I have an ‘all-hosts’ playbook which contains logic common to all hosts. This playbook is nested as an include in several top-level playbooks (for example deploy-application-x and deploy-application-y). When I run each of these top level playbooks I want to limit the hosts on which all-hosts runs to just the hosts defined in the top level playbook.
Here’s a slightly contrived example in code:
#deploy-app-x.yml