TASK [copy python package] ***************************************************************************************
fatal: [192.168.1.38]: FAILED! => {"changed": false, "checksum": "1e80b781eacc6b7e243bd277e5002426aa56d0f1", "msg": "Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!"} to retry, use: --limit @/home/wangchao/ansible/python2/python.retryPLAY RECAP *******************************************************************************************************
192.168.1.38 : ok=1 changed=0 unreachable=0 failed=1
解决办法:
yum install libselinux-python -y
直接关闭SElinux
修改/etc/selinux/config 文件
将SELINUX=enforcing改为SELINUX=disabled
重启机器即可