Ansible No Package matching found available installed or updated

When trying to manage packages with yum module via Ansible, on fresh installed RHEL / Centos Linux systems, you may face following error:

msg: No Package matching 'sendmail-cf' found available, installed or updated

This is caused by missing package yum-utils.

It can be installed with Ansible raw module (also used for installing python-simplejson for Ansible):

ansible -m raw -a "yum -y install yum-utils" --user=userx --sudo

Leave a Reply

Your email address will not be published. Required fields are marked *