Issue
Description: Ansible yum module doesn't install through control host, but local yum install works perfectly? What could cause such issue? I appreciate any response. Thank you guys. I worked on this 8 hours, I have researched various of things, and tried very different approaches. No success. Node: Centos7 (newly installed), Control-Node: Ubuntu-LTS18.
Command:
ansible ansitest2 -i ../inv -b -m yum -a "name=epel-release state=present"
it can be any package though.
This fails, however at the bottom I can see that it found the package and tried to install it. ()
If I go to host itself and try to install it, it is successful. :
yum install epel-release -y
Solution
After spending almost 2 days on this, finally found answer, /etc/resolve.conf file needed to be updated with option rotate timeout:1, So, if you have such issue, it is mainly about resolve.conf man resolve.conf will give very good description.
Answered By - John Haggin Answer Checked By - Mary Flores (WPSolving Volunteer)