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

--
Kai Stian Olstad

--
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/e38f0d4d-ae00-5ec3-888e-8f69644c2b78%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to