How to do it..

We're going to install the specific Python modules that enable the Ansible JUNOS_* modules to effectively communicate with JUNOS devices, routers, and switches. We'll also make some Ansible system changes in order to accommodate this.

  1. First of all, we're going to install the PyEZ JUNOS-eznc package on our Ansible control host because it contains some essential NETCONF-over-SSH functionality that Ansible will use:
  ubuntu@ubuntu-xenial:~$ pip install JUNOS-eznc  Collecting JUNOS-eznc  Collecting netaddr (from JUNOS-eznc)  Collecting PyYAML>=3.10 (from JUNOS-eznc)  Collecting pyserial (from JUNOS-eznc)  [...]  Successfully built ncclient  Installing collected packages: netaddr, PyYAML, pyserial,     setuptools, six, pycparser, cffi, ...

Get JUNOS Automation Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.