ansible报错AttributeError: module ‘urllib.request’ has no attribute ‘HTTPSHandler’
报错内容:
TASK [activemq : extract activemq tarball] ******************************************************************
fatal: [172.16.1.10]: FAILED! => {“changed”: false, “module_stderr”: “Shared connection to 172.16.1.10 closed.\r\n”, “module_stdout”: “Traceback (most recent call last):\r\n File “/tmp/ansible_3apyrzdd/ansible_module_unarchive.py”, line 136, in \r\n from ansible.module_utils.urls import fetch_url\r\n File “
解决办法:
yum install openssl-devel -y
重新编译python make&&make install
注:安装升级python时该装的依赖一个都不要少,常见 gcc glibc zlib-devel openssl-devel