执行ansible报CryptographyDeprecationWarning

现象:
执行ansible报CryptographyDeprecationWarning
/usr/local/lib/python3.6/site-packages/ansible/parsing/vault/init.py:44: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography and will be removed in a future release.

环境: Python3.6.8
ansible: ansible [core 2.11.12]
ansible安装方式: pip3 install ansible
执行任何命令报CryptographyDeprecationWarning:不影响ansible正常使用

解决:
降低cryptography 版本

pip uninstall cryptography
pip install cryptography==36.0.2

我这里用到了winrm,卸载cryptography时会把 requests_ntlm 作为依赖同时删除
所以重新安装即可
pip install requests_ntlm

你可能感兴趣的:(ansible,python,开发语言)