Thanks for the advice !

Le lundi 22 août 2016 15:34:49 UTC+2, Kai Stian Olstad a écrit :
>
> On 22. aug. 2016 09:19, Rémi Morel wrote: 
> > Hello, 
> > 
> > I have spend a lot of time to find a solution at this issue. 
> > I have a task : 
> > 
> > - name: check updated package (Debian) 
> >   command: apt-get -s install {{ item.item }} 
> >   register: updateD 
>
> The result of the command is registered in the variable updateD 
>
>
> >   when: (ansible_os_family == "Debian") and (installD is defined) and ( 
> {{ 
> > item.rc }} == 0) 
>
> You should not use {{ }} in when, they are implied. 
>
>
> >   with_items: "{{ installD.results }}" 
> >   failed_when: updateD > 1 
> >   changed_when: no 
> > 
> > and Ansible reaction is : 
> > 
> > [WARNING]: Consider using apt module rather than running apt-get 
> > 
> > But I don't find any option in documentation to obtain the result of 
> "-s". 
>
> Since they are in the variable updateD you can print out all of them 
> like this. 
>
> - debug: var=updateD 
>
>
> -- 
> Kai Stian Olstad 
>

-- 
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/bfa71578-bf0b-4053-99a1-3ce2b44d9e7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to