Tried that and does not work.

Apt sees it as "apt-get install [foo,bar]" instead of "apt-get install foo 
bar"

On Friday, 6 May 2016 10:58:42 UTC+2, Johannes Kastl wrote:
>
> On 06.05.16 10:56 [email protected] <javascript:> wrote: 
> > Hi, 
> > 
> > Is it possible to pass list of packages with --extra-vars that needs to 
> be 
> > installed with apt? I don't want to update the playbook everytime with 
> list 
> > of package. Currently I can pass one package and it installed fine. 
>
> Use something like this: 
>
> apt: name="{{ item }}" ... 
> with_items: your_package_list 
>
> and call the playbook with 
>
> ansible-playbook -e 'your_package_list=[foo,bar,xyz]' 
>
> Untested! 
>
> Johannes 
>
>

-- 
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/c8e9729e-5a33-4dc0-87f1-e75b8797f6ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to