lightcomet
lightcomet

Reputation: 13

Difference between ansible yum list?

I am trying to output a list of installed yum packages before and after running the yum update command in ansible. However, I note that for the list parameter, there are other options such as installed, updates, available and repos. May I know what is the difference between these options?

Upvotes: 1

Views: 418

Answers (1)

carrotcakeslayer
carrotcakeslayer

Reputation: 1008

Is making reference to the options avaialble in the "yum" package managenent. So easier way to know the difference is by referencing to "yum" documentation itself (or man page), as "yum" ansible module only uses its capabilities.

list - As ansible module doc explains, it is the equivalent to "yum list --show-duplicates "

installed - Will list the yum installed packages in the host

updates - Will return a list with the packages to be updated

available - Lists available packages.

repos - Will list the subscribed repos for the host.

You can always see the difference by yourself even using ad-hoc commands and visually exploring the output, like this.

ansible kube_workers -m yum -a 'list=repos'

Hope that helped.

Upvotes: 1

Related Questions