Configuring Ansible for JUNOS
In this recipe, we'll enhance our Ansible environment to work with JUNOS devices by making some changes. We'll use the core modules that ship with Ansible 2.1 and greater in order to remotely execute commands on the JUNOS devices.
Getting ready
In order to complete this recipe, you should have completed the previous recipe, Installing Ansible, and you'll need access to a JUNOS device for testing.
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.
- 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...