Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Troubleshooting Ansible Collection, Role, and Module Errors When Managing Devices Running Junos OS



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




The Ansible control node cannot locate the juniper.device collection or the Juniper.junos role and associated modules.


The juniper.device collection and Juniper.junos role are hosted on the Ansible Galaxy website. In order to use the modules in the collection or role, you must install the collection or role 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.

To install the Juniper.junos role on the Ansible control node, execute the ansible-galaxy install command, and specify Juniper.junos.


If you do not install the collection or role in the default location, you might need to define the path to it in your Ansible setup. For more information about installing collections and roles 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:

To use the Juniper.junos role modules, you must include the role in the playbook play. For example: