You might want to have a look at 
this 
http://docs.ansible.com/playbooks_best_practices.html#operating-system-and-distribution-variance

I think if you separated it this way, it might get rid of the need to 
define these in vars

On Wednesday, October 15, 2014 12:44:31 AM UTC-7, [email protected] 
wrote:
>
> Hi,
>
> I would like to know how to organize one task that I can install packages 
> depending on the *ansible_pkg_mgr* variable?
> Could you please provide an *example*, if possible?
>
> *Please note*: I know ... I can create two tasks with a "when" clause. I 
> have that in place.
>
> Kind regards,
> Thomas
>
> *Example* Dictionary in vars/main.yml:
>
> packages:
>     apt:
>         - exuberant-ctags
>         - cgdb
>         - figlet
>         - scite
>         - graphviz
>
>     yum:
>         - ctags
>         - cgdb
>         - figlet
>         - graphviz
>
>

-- 
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/be05e425-ee08-41af-a1aa-1f1f90bd2326%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to