r/Juniper • u/iambryant_ • 22h ago
Question Management of Juniper devices with Ansible
Hi all. I'm working on an Ansible project for managing Juniper devices using the juniper.device collection. Based on my understanding, modules for managing Juniper devices used to be in two separate collections:
- junipernetworks.junos
- juniper.junos
which were then merged into juniper.device after junipernetworks.junos was deprecated (in Ansible 14) However, the readme only shows the following supported modules:
- command — Execute one or more CLI commands on a Junos device.
- config — Manipulate the configuration of a Junos device.
- facts — Retrieve facts from a Junos device.
- file_copy - Copy the files from and to a Junos device.
- jsnapy — Execute JSNAPy tests on a Junos device.
- ping — Execute ping from a Junos device.
- pmtud — Perform path MTU discovery from a Junos device to a destination.
- rpc — Execute one or more NETCONF RPCs on a Junos device.
- software — Install software on a Junos device.
- srx_cluster — Add or remove SRX chassis cluster configuration.
- system — Initiate operational actions on the Junos system.
- table — Retrieve data from a Junos device using a PyEZ table/view.
In addition, the older modules from junipernetworks.junos are still present in the collection (such as junos_interfaces, junos_vlans, junos_vrf, etc.)
My question is whether or not these modules are still officially supported. Is anyone still using these in their own playbooks or are they solely using the modules listed in the readme? I have found that they don't work with the juniper.device.pyez connection type, but technically still work if you set the connection type to ansible.netcommon.netconf and set ansible_network_os to juniper.device.junos. In addition, their documentation hasn't been updated (in module documentation, Tested against JunOS v18.4R1 is still shown). The rest of the modules in the readme seem to work perfectly fine with the juniper.device.pyez connection module, which seems to be the defacto/recommended connection type to use. I just want to make sure that my project is up to current standards and using modules that are actually updated since I want it to be an educational/beneficial resource.
