AWX - Problem when running ansible-playbook for Juniper Networks devices via JOB defined in AWX

Hi all bros,

I’ve started-up AWX with docker-ce by follow this: https://github.com/ansible/awx/blob/devel/INSTALL.md
By root user (Or user with root permission) I can run some ansible playbook as well as normally via command “ansible-playbook”.
But when running JOB on AWX, alway has this error message:
““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.””
Although I’ve installed junos-eznc via pip command: pip install junos-eznc
This is some information about git list and verison of ansible that’s running:

@awx ~]$ pip list
Package Version


ansible 2.5.5
Babel 0.9.6
backports.ssl-match-hostname 3.5.0.1
certifi 2018.4.16
cffi 1.6.0
chardet 3.0.4
configobj 4.7.2
cryptography 1.7.2
decorator 3.4.0
docker-py 1.10.6
docker-pycreds 0.3.0
enum34 1.0.4
httplib2 0.9.2
idna 2.7
iniparse 0.4
ipaddress 1.0.22
IPy 0.75
Jinja2 2.7.2
jmespath 0.9.0
junos-eznc 2.1.8
kitchen 1.1.1
lxml 4.2.3
MarkupSafe 0.11
ncclient 0.5.3
netaddr 0.7.19
paramiko 2.1.1
perf 0.1
pip 10.0.1
ply 3.4
policycoreutils-default-encoding 0.1
pyasn1 0.1.9
pycparser 2.14
pycrypto 2.6.1
pycurl 7.19.0
pygobject 3.22.0
pygpgme 0.3
pyliblzma 0.5.3
pyserial 3.4
python-keyczar 0.71rc0
python-linux-procfs 0.4.9
pyudev 0.15
pyxattr 0.5.1
PyYAML 3.10
requests 2.19.1
schedutils 0.4
scp 0.11.0
seobject 0.1
sepolicy 1.1
setuptools 0.9.8
six 1.11.0
slip 0.4.0
slip.dbus 0.4.0
urlgrabber 3.10
urllib3 1.23
websocket-client 0.48.0
yum-metadata-parser 1.1.4

Tu DT,

Take a peek at this doc:

https://github.com/ansible/awx/blob/devel/docs/custom_virtualenvs.md

The short version is that you probably want:

/var/lib/awx/venv/ansible/bin/pip install junos-eznc

Very useful tips on this post:

https://github.com/ksator/junos-automation-with-AWX

My issue has been resolved!

Regards,
Tu DT

Thanks so much :slight_smile: