Bug Fix
junos_rpc was not working with anisble 2.0.1.0 #114
For junos >=14.2 json config can be register to rpc_reply
- name: Get Device Configuration
hosts: all
roles:
- Juniper.junos
connection: local
gather_facts: no
tasks:
- name: Get interface information
junos_rpc:
host={{ inventory_hostname }}
rpc=get-interface-information
kwargs={interface_name:em0,media:True}
format=json
dest=get_interface_information.conf
register: junos
- name: Print configuration
debug: msg="{{ junos.rpc_reply }}"