Using that approach, the more platforms your hosts will sport, the more 
"skipping" you'll see in your playbook runs.
I'd use the group_by module: http://docs.ansible.com/group_by_module.html 
and use the ansible_distribution fact as a key.
Hope that helps.

On Friday, 20 February 2015 20:01:39 UTC+1, Nusenu wrote:
>
> Hi, 
>
> I'm creating a role that supports multiple platforms and should handle 
> them transparently to the end user. 
>
> something like the following works fine for tasks/main.yml but doesn't 
> work for default/main.yml 
>
> - include: apt.yml 
>   when: ansible_pkg_mgr == 'apt' 
>
>
> What is the best way to set vars based on facts (while still 
> encapsulating it in a role)? 
>
> thanks! 
> Nusenu 
>
>
>
>

-- 
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/644d0b5f-8780-4807-ae75-f6985f5d12d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to