Not sure if it's possible with ansbile but with Salt you can set Grains and do 
if else statements based on those grains 

{% if role[host1] } 
- role: host1 
{% elif role[hoat2] %}
-role: host 2
{%endif%}

I would look up condition s for ansible 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/babcda8b-87d5-42fd-a39e-f3fb94ab4290%40googlegroups.com.

Reply via email to