Hi Daniel, Would you please share how did you upgrade? I am also getting similar error.
"TASK [GET-MODEL] *************************************************************** fatal: [192.168.56.103]: FAILED! => {"changed": false, "failed": true, "module_stderr": "/usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py:141: FutureWarning: CTR mode needs counter parameter, not IV\n self._cipher = factory.new(key, *args, **kwargs)\nTraceback (most recent call last):\n File \"/home/yasir/.ansible/tmp/ansible-tmp-1492337992.22-261119891504603/junos_get_facts\", line 2168, in <module>\n main()\n File \"/home/yasir/.ansible/tmp/ansible-tmp-1492337992.22-261119891504603/junos_get_facts\", line 176, in main\n dev.facts['has_2RE'] = dev.facts['2RE']\n File \"/usr/local/lib/python2.7/dist-packages/jnpr/junos/factcache.py\", line 171, in __setitem__\n raise RuntimeError(\"facts are read-only!\")\nRuntimeError: facts are read-only!\n", "module_stdout": "", "msg": "MODULE FAILURE", "parsed": false} PLAY RECAP ********************************************************************* 192.168.56.103 : ok=0 changed=0 unreachable=0 failed=1 " Thanks, MYN On Tuesday, April 11, 2017 at 8:59:54 PM UTC+8, Daniel Ratcliffe wrote: > > Hello, > > I installed Ansible(2.2.1.0), the Juniper.junos(1.4.0) role from Ansible > galaxy with junos-eznc (2.1.1). I tried to create a test playbook to obtain > the version of my test switch as shown below. > > --- > - name: Get Device Facts > hosts: juniper > roles: > - Juniper.junos > connection: local > gather_facts: no > tasks: > - name: Checking NETCONF connectivity > wait_for: host={{ inventory_hostname }} port=830 timeout=5 > > - name: Get Facts > junos_get_facts: > host={{ inventory_hostname }} > savedir=/home/dratcliffe/ansible > register: junos > > - name: Show Version > debug: msg="{{ junos.facts.version }}" > > when I run the playback I get the following error. > > [user@ansible ~]$ ansible-playbook test.yml > > PLAY [Get Device Facts] > ******************************************************** > > TASK [Checking NETCONF connectivity] > ******************************************* > ok: [X.X.X.X] > > TASK [Get Facts] > *************************************************************** > An exception occurred during task execution. To see the full traceback, > use -vvv. The error was: RuntimeError: facts are read-only! > fatal: [X.X.X.X]: FAILED! => {"changed": false, "failed": true, > "module_stderr": "Traceback (most recent call last):\n File > \"/tmp/ansible_SkXS6C/ansible_module_junos_get_facts.py\", line 235, in > <module>\n main()\n File > \"/tmp/ansible_SkXS6C/ansible_module_junos_get_facts.py\", line 176, in > main\n dev.facts['has_2RE'] = dev.facts['2RE']\n File > \"/usr/lib/python2.7/site-packages/jnpr/junos/factcache.py\", line 171, in > __setitem__\n raise RuntimeError(\"facts are > read-only!\")\nRuntimeError: facts are read-only!\n", "module_stdout": "", > "msg": "MODULE FAILURE"} > to retry, use: --limit @/home/dratcliffe/test.retry > > PLAY RECAP > ********************************************************************* > X.X.X.X : ok=1 changed=0 unreachable=0 failed=1 > > > It seems when it gets the facts it tried to write something and I get an > error saying it is read-only? Has anyone encountered this? > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4a3d66ce-b2b3-47a9-b901-ac4e33c57f0d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.