报错提示
[root@yx01 site-packages]# ansible all -m ping
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit
localhost does not match 'all'
/usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.3) or chardet (2.2.1) doesn't match a supported version!
RequestsDependencyWarning)
显示urllib3 (1.25.3) or chardet (2.2.1)版本不匹配
使用pip命令删除库
pip uninstall urllib3
pip uninstall chardet
但是还是报相同的错误
在依赖库的目录/usr/lib/python2.7/site-packages/
下发现还是有其它版本的urllib3和chardet
手动删除后再使用ansible all -m ping
可以成功