【问题标题】:Junos_config not working anymore with ansible 2.5 python jsonDecoderErrorJunos_config 不再适用于 ansible 2.5 python jsonDecoderError
【发布时间】:2023-04-07 20:18:01
【问题描述】:

自从我们从 ansible 2.4.3 升级到 2.5.0 后,Junos_config 因未找到与 jasonDecoderError 相关的错误而失败。在做了一些研究之后,似乎这个属性只在 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]

【问题讨论】:

    标签:
    python
    json
    ansible
    junos-automation