Am Donnerstag, 3. August 2017 18:43:13 UTC+2 schrieb Kai Stian Olstad:
>
> On 03. aug. 2017 18:01, Cev Ing wrote: 
> > I wrote a role for Solaris systems. And now I would like to apply the 
> role 
> > to all systems, which have been identified by Ansible to be a Solaris 
> host. 
> > 
> > I know that I can write an inventory group containing all Solaris 
> servers. 
> > But this sounds redundant to me. Instead I want Ansible to check if the 
> > host is a Solaris host and if so, apply the role for Solaris systems. 
> > 
> > How can this be done? 
>
> With when 
>
> https://docs.ansible.com/ansible/latest/playbooks_conditionals.html#the-when-statement
>  
>
>
I dont think it is possible to use a when statement on a role. Are you sure?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/fd76c28a-a263-451a-ae98-bd49e541cd99%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to