Would it be possible to add conditional includes?
I have playbooks to install an apps. I play those in different environments (acceptance, production, etc...), and some products included need to be installed only in some of the environement. Here's an example:
Yves Dorfsman wrote:
Would it be possible to add conditional includes?
I have playbooks to install an apps. I play those in different
environments
(acceptance, production, etc...), and some products included need to be
installed only in some of the environement. Here's an example:
Sounds exactly like what groups and hosts: is for. Why would you have nodes
in your splunk group that aren't supposed to have it installed? If, for some
reason you do, hosts: splunk:&environment works to limit the play to nodes
in both those groups.
Conditionals do work on task includes, but not on playbook includes right
now, primarily because plays already have hosts: to decide which nodes to
run on.
Daniel