ansible yum not working I find the solution, just add a python path to hosts file ansible_python_interpreter=/usr/bin/python2.7