how to get a list of upgradable packages from yum,apt or anothermodule

337 views
Skip to first unread message

Karl Fiabeschi

unread,
Aug 30, 2017, 3:09:43 AM8/30/17
to Ansible Project

Hi there, is it possible with the yum or apt module to obtain a list of upgradable packages without upgrading them?

Like the command "yum check-update" or "apt list --upgradable"


Only output, json format is better :)


Ty


ps i posted this question also on reddit sub with no luck

Dick Visser

unread,
Aug 30, 2017, 3:25:46 AM8/30/17
to ansible...@googlegroups.com
On 30 August 2017 at 09:09, Karl Fiabeschi <1984i...@gmail.com> wrote:
>
> Hi there, is it possible with the yum or apt module to obtain a list of
> upgradable packages without upgrading them?
>
> Like the command "yum check-update" or "apt list --upgradable"


No.
Those modules are meant to ensure a specific package is in a specific state.
For what you want you have to resort to the command module and parse the output.


--
Dick Visser
GÉANT

Want to join us? We're hiring: https://www.geant.org/jobs
Reply all
Reply to author
Forward
0 new messages