由于我们从 ansible 2.4.3 升级到 2.5.0,Junos_config 失败并出现与 jasonDecoderError not found 相关的错误。在做了一些研究之后,似乎这个属性只在 python 3.5 及更高版本中受支持。我们正在运行 python 2.7.6。
但是 Ansible 2.5 仍然应该与 python 2.7 兼容,对吧?那么我们为什么会遇到这种情况呢?
谢谢,
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'module' object has no attribute 'JSONDecodeError'
fatal: [mx52-lab]: FAILED! => {"msg": "Unexpected failure during module execution.", "stdout": ""}
python --version
Python 2.7.6
ansible --version
ansible 2.5.0
config file = /home/aurelien/ansible/ansible.cfg
configured module search path = [u'/homeipa/aurelien/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.6 (default, Nov 23 2017, 15:49:48) [GCC 4.8.4]