Re: [ansible-project] List of items in deb parameter of apt module

2019-04-18 Thread Dick Visser
Sorry, too fast. There is a deb parameter!

But according to
https://docs.ansible.com/ansible/latest/modules/apt_module.html that
parameter does not support a list argument.
The "name" parameter does.
The porting guide says this explicitly:
"Instead of relying on implicit squashing, tasks should instead supply
the list directly to the name, pkg or package parameter of the
module."

So if you need to iterate over a list of local deb files, you'd still
have to do it in a loop.



Dick

On Thu, 18 Apr 2019 at 12:05, Dick Visser  wrote:
>
> The apt module does not have a "deb" parameter. Use "name" instead.
>
> https://docs.ansible.com/ansible/latest/modules/apt_module.html
>
> On Thu, 18 Apr 2019 at 10:41,  wrote:
> >
> > Hi!
> >
> > Since the with_items are going to be deprecated and following the porting 
> > guide here: 
> > https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.7.html
> > I tried to rewrite some of my tasks where I am installing debian packages 
> > to use list format (which works with packages that come from a debian 
> > repository in the name parameter), but ran into an issue.
> >
> > It seems that the deb parameter does not work with lists.
> >
> > This is what I have (and works)
> >
> > - name: Install local .deb-packages
> >   apt:
> > deb: "{{ item }}"
> > state: present
> >   with_items:
> >   - "/some/path/packet_A.deb"
> >   - "/some/path/packet_B.deb"
> >
> > and this is what I tried to do (which fails)
> >
> > - name: Install local .deb-packages
> >   apt:
> > deb:
> >   - "/some/path/packet_A.deb"
> >   - "/some/path/packet_B.deb"
> > state: present
> >
> > Did I misunderstand something or is this an open issue in the apt module 
> > that needs to be fixed before deprecating the with_items variant?
> >
> > Thanks for your help in advance!
> >
> >
> > --
> > 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 ansible-project+unsubscr...@googlegroups.com.
> > To post to this group, send email to ansible-project@googlegroups.com.
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/ansible-project/f55e06be-af9c-4239-876a-27d048f5abfc%40googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Dick Visser
> Trust & Identity Service Operations Manager
> GÉANT

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwPi3X2PvgKKySrkLD-8vrq-U-mJSxSkeM7f6v-e_4eg%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] List of items in deb parameter of apt module

2019-04-18 Thread Dick Visser
The apt module does not have a "deb" parameter. Use "name" instead.

https://docs.ansible.com/ansible/latest/modules/apt_module.html

On Thu, 18 Apr 2019 at 10:41,  wrote:
>
> Hi!
>
> Since the with_items are going to be deprecated and following the porting 
> guide here: 
> https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.7.html
> I tried to rewrite some of my tasks where I am installing debian packages to 
> use list format (which works with packages that come from a debian repository 
> in the name parameter), but ran into an issue.
>
> It seems that the deb parameter does not work with lists.
>
> This is what I have (and works)
>
> - name: Install local .deb-packages
>   apt:
> deb: "{{ item }}"
> state: present
>   with_items:
>   - "/some/path/packet_A.deb"
>   - "/some/path/packet_B.deb"
>
> and this is what I tried to do (which fails)
>
> - name: Install local .deb-packages
>   apt:
> deb:
>   - "/some/path/packet_A.deb"
>   - "/some/path/packet_B.deb"
> state: present
>
> Did I misunderstand something or is this an open issue in the apt module that 
> needs to be fixed before deprecating the with_items variant?
>
> Thanks for your help in advance!
>
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/f55e06be-af9c-4239-876a-27d048f5abfc%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwOH0XHvUTpsePKEbE4Nzw%3D6w0GQKdNx7%2BQ80%2BFm8zgmDw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] List of items in deb parameter of apt module

2019-04-18 Thread f . floimair . commend
Hi!

Since the with_items are going to be deprecated and following the porting 
guide here: 
https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.7.html
I tried to rewrite some of my tasks where I am installing debian packages 
to use list format (which works with packages that come from a debian 
repository in the name parameter), but ran into an issue.

It seems that the deb parameter does not work with lists.

This is what I have (and works)

- name: Install local .deb-packages
  apt:
deb: "{{ item }}"
state: present
  with_items:
  - "/some/path/packet_A.deb"
  - "/some/path/packet_B.deb"

and this is what I tried to do (which fails)

- name: Install local .deb-packages
  apt:
deb:
  - "/some/path/packet_A.deb"
  - "/some/path/packet_B.deb"
state: present

Did I misunderstand something or is this an open issue in the apt module 
that needs to be fixed before deprecating the with_items variant?

Thanks for your help in advance!


-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f55e06be-af9c-4239-876a-27d048f5abfc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.