I want to check if a package need to be updated and write a log file. That
why i use apt-get -s install, and I put the result with a register to use
it later.
Thanks for watching my problem.
RM
Le lundi 22 août 2016 15:25:34 UTC+2, Jean-Yves LENHOF a écrit :
>
> Le 22/08/2016 à 09:19, Rémi Morel a écrit :
>
> 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
> when: (ansible_os_family == "Debian") and (installD is defined) and ( {{
> item.rc }} == 0)
> 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".
>
>
> Hi,
>
> Could you explain what you want to do ?
> To not do things in ansible but simulate, there's --check command line
> option
>
> Regards,
>
> JYL
>
--
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/7582a25d-4f2f-43dc-835a-388d4e9d77e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.