Limit hosts for nested playbook

Is it possible to limit the hosts that run against a nested playbook? For example, I have a site.yml file that includes other playbooks like so:

no

I suggest you create some groups in your inventory, so instead of

  • hosts: all

you run against

  • hosts: webservers

(obviously webservers is just an example of a group).

This is nice when reading playbooks as you instantly get a notion of what roles are needed on the different types of server you are managing.

Hope this helps,

Jon