Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Troubleshoot Ansible Collection and Module Errors When Managing Junos Devices

Problem

Description

During execution of an Ansible playbook, the control node generates an error that the juniper.device collection was not found, that no action was detected in the task, or that the module could not be resolved. For example:

or

Cause

The Ansible control node cannot locate the juniper.device collection and associated modules.

Solution

The juniper.device collection is hosted on the Ansible Galaxy website. In order to use the modules in the collection, you must install the collection on the Ansible control node and also reference it in your playbook.

To install the juniper.device collection on the Ansible control node, execute the ansible-galaxy collection install command, and specify juniper.device.

Note:

If you do not install the collection in the default location, you might need to define the path to it in your Ansible setup. For more information about installing collections and specifying the path, see the official Ansible documentation.

To use the juniper.device collection modules, reference the fully qualified collection name when you execute a module. For example: