Hi,
I have play that includes another play
apps.yml
`
-
name: apps.yml | provision
hosts: apps
include: provision.yml -
name: apps.yml | common stuff
hosts: apps
roles: -
do_common_stuff
`
provision.yml
`
-
hosts: “{{subset_var}}”
connection: local
gather_facts: no
pre_tasks: -
name: do some stuff
dosome_tasks
roles: -
{ role: do_some_provisioning }
-
{ role: do_more_stuff}
-
{ role: maybe_also_dns}
`
The concept is that provision will be called from different plays for different groups and the provision play will take the subset of the parent play.
If you have a solution that does not involve passing “-e” it would be great to share