I am getting this error when trying to run my playbook even though I have already installed pyEZ. Can anyone please help me to fix it?

MCBOOK:~ user2018$ ansible-playbook simpletest.yml

[DEPRECATION WARNING]: [defaults]hostfile option, The key is misleading as it can also be a list of hosts, a directory or a list of paths , use [defaults] inventory=/path/to/file|dir instead. This feature will be removed in version 2.8. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

PLAY [simpletest]


TASK [get facts] ****************************************************************************************************************************************************************************************************** fatal: [cor-001]: FAILED! => {"changed": false, "msg": "junos-eznc (aka PyEZ) >= 2.1.7 is required for this module. However, junos-eznc does not appear to be currently installed. See https://github.com/Juniper/py-junos-eznc#installation for details on installing junos-eznc."} to retry, use: --limit @/Users/farhad.kamran/simpletest.retry

PLAY RECAP ************************************************************************************************************************************************************************************************************ cor-001 : ok=0 changed=0 unreachable=0 failed=1

MCBOOK:~ user2018$ python

Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 12:01:12) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import jnpr.junos

jnpr.junos.__version__

'2.1.8dev1'
1

There are 1 best solutions below

0
On

"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...

Maybe its incompatible with your environment or dependencies...