0

Since we upgraded from ansible 2.4.3 to 2.5.0, Junos_config is failing with an error related to jasonDecoderError not found. After doing some research it seems that this attribute is only supported in python 3.5 and above. we are running python 2.7.6.

But Ansible 2.5 is still supposed to be compatible with python 2.7 right? So why are we running into this?

Thanks,

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]
bundyboy
  • 13
  • 1
  • 4

1 Answers1

0

Why don't you prefer using juniper supported galaxy roles. You can try with juniper_junos_config. For example: please check

https://github.com/Juniper/ansible-junos-stdlib/blob/master/library/juniper_junos_config.py

Nitin Kr
  • 521
  • 2
  • 12
  • thanks for your answer, for now we are fine using the core junos module, I will have a look at the galaxy one but for the moment I would just need to understand why the junos_config is not working anymore since the update to 2.5... – bundyboy Mar 29 '18 at 12:54
  • You can raise a GitHub issue at gihub.com/Ansible/ansible – Nitin Kr Mar 29 '18 at 12:56