get the list of packages to update.

Hi all,
I would like to automate a task to check the list of packages that need to be updated in my server farm with ansible.

Is there any way to do it?

I have seen that the yum module has the option to install the lastest, but not to check the packages
and I have tried it from shell,
shell
but it is blocked if it finds a Red Hat with local repository without license (should give error and continue , do not?)

thx.

Use the yum module and run Ansible in check mode
https://docs.ansible.com/ansible/latest/playbooks_checkmode.html