Note
This module is part of the junipernetworks.junos collection (version 9.1.0).
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install junipernetworks.junos. You need further requirements to be able to use this module, see Requirements for details.
To use it in a playbook, specify: junipernetworks.junos.junos_rpc.
New in junipernetworks.junos 1.0.0
xml key. If an alternate output format is requested, the reply is transformed to the requested output.The below requirements are needed on the host that executes this module.
Parameter | Comments |
|---|---|
args dictionary | The |
attrs dictionary | The |
output string | The Choices:
|
rpc string / required | The |
Note
netconf. See the Junos OS Platform Options.local connections for legacy playbooks.- name: collect interface information using rpc
junipernetworks.junos.junos_rpc:
rpc: get-interface-information
args:
interface-name: em0
media: true
- name: get system information
junipernetworks.junos.junos_rpc:
rpc: get-system-information
- name: load configuration
junipernetworks.junos.junos_rpc:
rpc: load-configuration
attrs:
action: override
url: /tmp/config.conf
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
output string | The rpc rely converted to the output format. Returned: always |
output_lines list / elements=string | The text output split into lines for readability. Returned: always |
xml string | The xml return string from the rpc request. Returned: always |
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/junipernetworks/junos/junos_rpc_module.html