Hi, Please have a look at https://gist.github.com/hostmaster/db37c8e6c2a43997a224
It is not probably what you are looking for exactly, however it is very close and it works. And I hope the idea is clear. -- Best, Igor On Wed, Oct 15, 2014 at 11:44 AM, <[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/36cbd28b-6849-4fb5-badb-e7136c6bfdcb%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- 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/CAGuansr%2BCi9Fh%2BPS0jcmuMjoOT3qvRreJG5XCiH6xojY3vbdwQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
