执行ansible报错Support for it is now deprecated in cryptography的解决办法

执行ansible报以下错误,这是由于cryptography版本太高导致。

/usr/lib/python2.7/site-packages/ansible/parsing/vault/init.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
from cryptography.exceptions import InvalidSignature

解决办法:

卸载新版本,安装老版本

pip uninstall cryptography
pip install cryptography==2.6

再次使用ansible就不会有那个错误了!

发表评论

后才能评论