Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


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




During execution of an Ansible playbook, the control machine generates an error that the Juniper.junos role was not found or that no action was detected in the task. For example:



The Ansible control machine cannot locate the Juniper.junos role and associated modules.


The Juniper.junos role is hosted on the Ansible Galaxy website. In order to use the modules in the role, you must install the role on the Ansible control machine, and you must include the role in your playbook.

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

[root@ansible-cm]# ansible-galaxy install Juniper.junos

If you do not install the role in the default location, you might need to define the path to the role in your playbook or Ansible setup. For more information about installing roles, see Installing Roles and roles_path in the official Ansible documentation.

To enable the playbook to reference the modules, include the Juniper.junos role in the playbook play. For example: