question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

junos-eznc required version - not correct

See original GitHub issue

States that >= 1.2.2 is required, but 1.3.1 is installed when running playbook to update configuration.

PLAY [NTP Update] **************************************************************

TASK [Checking NETCONF connectivity] *******************************************
ok: [MY-SRX]

TASK [junos_install_config] ****************************************************
fatal: [MY-SRX]: FAILED! => {"changed": false, "failed": true, "msg": "junos-eznc >= 1.2.2 is required for this module"}

PLAY RECAP *********************************************************************
MY-SRX     : ok=1    changed=0    unreachable=0    failed=1

(env) MAC:~/Ansible-JunOS/junos-deploy$pip list | grep junos-eznc
junos-eznc (1.3.1)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:25 (11 by maintainers)

github_iconTop GitHub Comments

7reactions
dgarroscommented, May 31, 2016

Hi can you try to define the variable ansible_python_interpreter You can put it inside your inventory or any variable file

## Inside your inventory
[all:vars]
ansible_python_interpreter=/usr/local/bin/python

For me It solved some issues related to python environment

1reaction
stacywsmithcommented, Nov 6, 2017

Closing this issue.

Ansible actually only uses the shebang line to determine that the module is written in Python. If the line contains python, it is assumed to be a module written in Python.

Ansible best practice is that the line actually be:

#!/usr/bin/python

Regardless of the Python path in the shebang line, Ansible executes the module with the Python interpreter specified by the ansible_python_interpreter inventory variable. (note: this is an inventory variable, not an environment variable, configuration variable, or playbook variable.)

The value of ansible_python_interpreter defaults to /usr/bin/python. If your Python is in another location, you MUST set the ansible_python_interpreter variable to the correct value for your installation in the inventory file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Junos PyEZ (junos-eznc) Install Errors for ...
During execution of a juniper.device module or a Juniper.junos module, the Ansible control node generates an error that junos-eznc is not installed.
Read more >
junos-eznc required but does not appear to be installed
Hi all, I am getting the following error when trying to run a playbook. NY-APatel-home:ansible anish.patel$ ansible-playbook -i dev interface.yaml
Read more >
[cor-001]: FAILED! => {"changed": false, "msg": "junos-eznc ...
"junos-eznc (aka PyEZ) >= 2.1.7 is required for this module. Try installing 2.1.7 version. As i can see you have 2.1.8dev1.
Read more >
junos-eznc
Junos 'EZ' automation for non-programmers. ... Latest version. Released: Dec 9, 2022 ... The author of this package has not provided a project...
Read more >
Installs packages on remote devices running Junos
Parameter Parameter Choices/Defaults force. boolean force. boolean Choices: no ←. yes force_host. boolean. added in 2.8 force_host. boolean. added in 2.8 Choices: no ←. yes issu....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found