Skip to content

Instantly share code, notes, and snippets.

@Ruchip16
Created September 17, 2025 06:18
Show Gist options
  • Save Ruchip16/bf22639069819d497e2235b29d34542b to your computer and use it in GitHub Desktop.
Save Ruchip16/bf22639069819d497e2235b29d34542b to your computer and use it in GitHub Desktop.
documentation/run_junos_command
inventory -
[junos]
x.x.x.x
[junos:vars]
ansible_network_os=junipernetworks.junos.junos
ansible_user=vbnmm
ansible_ssh_pass=nmnnn
ansible_connection=ansible.netcommon.network_cli
Playbook -
---
- name: Functional Test - junos_command module
hosts: junos
gather_facts: false
tasks:
- name: Run show version
junipernetworks.junos.junos_command:
commands:
- show version
register: version_output
- name: Assert show version output is returned
assert:
that:
- version_output.stdout is defined
- "'Junos' in version_output.stdout[0]"
- name: Run show version with wait_for condition (positive match)
junipernetworks.junos.junos_command:
commands: show version
wait_for:
- result[0] contains Hostname
register: show_version_wait_positive
- name: Assert wait_for with positive match passed
assert:
that:
- show_version_wait_positive.stdout is defined
- show_version_wait_positive.failed_conditions is not defined
- name: Run multiple commands
junipernetworks.junos.junos_command:
commands:
- show version
- show interfaces terse
register: multi_output
- name: Assert multiple commands worked
assert:
that:
- multi_output.stdout | length == 2
- "'Interface' in multi_output.stdout[1]"
- name: Run show version with json output
junipernetworks.junos.junos_command:
commands: show version
display: json
register: json_output
- name: Assert json output is returned
assert:
that:
- json_output.stdout is defined
- name: Run RPC get-software-information
junipernetworks.junos.junos_command:
commands:
- show version | display json
register: rpc_output
- name: Assert RPC output
assert:
that:
- rpc_output.stdout is defined
- rpc_output.stdout[0] is string
logs -
ansible-playbook [core 2.18.6]
config file = /Users/ruchi/myenv-python312/ansible.cfg
configured module search path = ['/Users/ruchi/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/ruchi/.virtualenvs/junosenv_test/lib/python3.13/site-packages/ansible
ansible collection location = /Users/ruchi/myenv-python312/ansible-junos-stdlib/ansible_collections
executable location = /Users/ruchi/.virtualenvs/junosenv_test/bin/ansible-playbook
python version = 3.13.7 (main, Aug 14 2025, 11:12:11) [Clang 17.0.0 (clang-1700.0.13.3)] (/Users/ruchi/.virtualenvs/junosenv_test/bin/python)
jinja version = 3.1.6
libyaml = True
Using /Users/ruchi/myenv-python312/ansible.cfg as config file
host_list declined parsing /Users/ruchi/myenv-python312/inventory as it did not pass its verify_file() method
script declined parsing /Users/ruchi/myenv-python312/inventory as it did not pass its verify_file() method
auto declined parsing /Users/ruchi/myenv-python312/inventory as it did not pass its verify_file() method
Parsed /Users/ruchi/myenv-python312/inventory inventory source with ini plugin
redirecting (type: modules) junipernetworks.junos.junos_command to juniper.device.junos_command
redirecting (type: modules) junipernetworks.junos.junos_command to juniper.device.junos_command
redirecting (type: modules) junipernetworks.junos.junos_command to juniper.device.junos_command
redirecting (type: modules) junipernetworks.junos.junos_command to juniper.device.junos_command
redirecting (type: modules) junipernetworks.junos.junos_command to juniper.device.junos_command
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: junos_new.yaml *******************************************************
1 plays in junos_new.yaml
PLAY [Functional Test - junos_command module] **********************************
TASK [Run show version] ********************************************************
task path: /Users/ruchi/myenv-python312/junos_new.yaml:7
redirecting (type: modules) junipernetworks.junos.junos_command to juniper.device.junos_command
redirecting (type: modules) junipernetworks.junos.junos_command to juniper.device.junos_command
Using module file /Users/ruchi/myenv-python312/ansible-junos-stdlib/ansible_collections/juniper/device/plugins/modules/junos_command.py
Pipelining is enabled.
<10.0.151.96> ESTABLISH LOCAL CONNECTION FOR USER: ruchi
<10.0.151.96> EXEC /bin/sh -c '/Users/ruchi/.virtualenvs/junosenv_test/bin/python && sleep 0'
ok: [10.0.151.96] => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
"show version"
],
"display": null,
"interval": 1,
"match": "all",
"retries": 10,
"rpcs": null,
"wait_for": null
}
},
"stdout": [
"Hostname: 10.0.151.96\nModel: vsrx\nJunos: 18.4R1.8\nJUNOS OS Kernel 64-bit [20181207.6c2f68b_2_builder_stable_11]\nJUNOS OS libs [20181207.6c2f68b_2_builder_stable_11]\nJUNOS OS runtime [20181207.6c2f68b_2_builder_stable_11]\nJUNOS OS time zone information [20181207.6c2f68b_2_builder_stable_11]\nJUNOS OS libs compat32 [20181207.6c2f68b_2_builder_stable_11]\nJUNOS OS 32-bit compatibility [20181207.6c2f68b_2_builder_stable_11]\nJUNOS py extensions [20181217.004159_builder_junos_184_r1]\nJUNOS py base [20181217.004159_builder_junos_184_r1]\nJUNOS OS vmguest [20181207.6c2f68b_2_builder_stable_11]\nJUNOS OS crypto [20181207.6c2f68b_2_builder_stable_11]\nJUNOS network stack and utilities [20181217.004159_builder_junos_184_r1]\nJUNOS libs [20181217.004159_builder_junos_184_r1]\nJUNOS libs compat32 [20181217.004159_builder_junos_184_r1]\nJUNOS runtime [20181217.004159_builder_junos_184_r1]\nJUNOS Web Management Platform Package [20181217.004159_builder_junos_184_r1]\nJUNOS srx libs compat32 [20181217.004159_builder_junos_184_r1]\nJUNOS srx runtime [20181217.004159_builder_junos_184_r1]\nJUNOS srx platform support [20181217.004159_builder_junos_184_r1]\nJUNOS common platform support [20181217.004159_builder_junos_184_r1]\nJUNOS srxtvp runtime [20181217.004159_builder_junos_184_r1]\nJUNOS pppoe [20181217.004159_builder_junos_184_r1]\nJUNOS mtx network modules [20181217.004159_builder_junos_184_r1]\nJUNOS modules [20181217.004159_builder_junos_184_r1]\nJUNOS srxtvp modules [20181217.004159_builder_junos_184_r1]\nJUNOS srxtvp libs [20181217.004159_builder_junos_184_r1]\nJUNOS srx libs [20181217.004159_builder_junos_184_r1]\nJUNOS srx Data Plane Crypto Support [20181217.004159_builder_junos_184_r1]\nJUNOS daemons [20181217.004159_builder_junos_184_r1]\nJUNOS srx daemons [20181217.004159_builder_junos_184_r1]\nJUNOS SRX TVP AppQos Daemon [20181217.004159_builder_junos_184_r1]\nJUNOS High End AppQos Daemon [20181217.004159_builder_junos_184_r1]\nJUNOS Extension Toolkit [20181217.004159_builder_junos_184_r1]\nJUNOS Phone-home [20181217.004159_builder_junos_184_r1]\nJUNOS J-Insight [20181217.004159_builder_junos_184_r1]\nJUNOS Online Documentation [20181217.004159_builder_junos_184_r1]\nJUNOS jail runtime [20181207.6c2f68b_2_builder_stable_11]\nJUNOS FIPS mode utilities [20181217.004159_builder_junos_184_r1]"
],
"stdout_lines": [
[
"Hostname: 10.0.151.96",
"Model: vsrx",
"Junos: 18.4R1.8",
"JUNOS OS Kernel 64-bit [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS OS libs [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS OS runtime [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS OS time zone information [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS OS libs compat32 [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS OS 32-bit compatibility [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS py extensions [20181217.004159_builder_junos_184_r1]",
"JUNOS py base [20181217.004159_builder_junos_184_r1]",
"JUNOS OS vmguest [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS OS crypto [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS network stack and utilities [20181217.004159_builder_junos_184_r1]",
"JUNOS libs [20181217.004159_builder_junos_184_r1]",
"JUNOS libs compat32 [20181217.004159_builder_junos_184_r1]",
"JUNOS runtime [20181217.004159_builder_junos_184_r1]",
"JUNOS Web Management Platform Package [20181217.004159_builder_junos_184_r1]",
"JUNOS srx libs compat32 [20181217.004159_builder_junos_184_r1]",
"JUNOS srx runtime [20181217.004159_builder_junos_184_r1]",
"JUNOS srx platform support [20181217.004159_builder_junos_184_r1]",
"JUNOS common platform support [20181217.004159_builder_junos_184_r1]",
"JUNOS srxtvp runtime [20181217.004159_builder_junos_184_r1]",
"JUNOS pppoe [20181217.004159_builder_junos_184_r1]",
"JUNOS mtx network modules [20181217.004159_builder_junos_184_r1]",
"JUNOS modules [20181217.004159_builder_junos_184_r1]",
"JUNOS srxtvp modules [20181217.004159_builder_junos_184_r1]",
"JUNOS srxtvp libs [20181217.004159_builder_junos_184_r1]",
"JUNOS srx libs [20181217.004159_builder_junos_184_r1]",
"JUNOS srx Data Plane Crypto Support [20181217.004159_builder_junos_184_r1]",
"JUNOS daemons [20181217.004159_builder_junos_184_r1]",
"JUNOS srx daemons [20181217.004159_builder_junos_184_r1]",
"JUNOS SRX TVP AppQos Daemon [20181217.004159_builder_junos_184_r1]",
"JUNOS High End AppQos Daemon [20181217.004159_builder_junos_184_r1]",
"JUNOS Extension Toolkit [20181217.004159_builder_junos_184_r1]",
"JUNOS Phone-home [20181217.004159_builder_junos_184_r1]",
"JUNOS J-Insight [20181217.004159_builder_junos_184_r1]",
"JUNOS Online Documentation [20181217.004159_builder_junos_184_r1]",
"JUNOS jail runtime [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS FIPS mode utilities [20181217.004159_builder_junos_184_r1]"
]
]
}
TASK [Assert show version output is returned] **********************************
task path: /Users/ruchi/myenv-python312/junos_new.yaml:13
ok: [10.0.151.96] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [Run show version with wait_for condition (positive match)] ***************
task path: /Users/ruchi/myenv-python312/junos_new.yaml:19
redirecting (type: modules) junipernetworks.junos.junos_command to juniper.device.junos_command
redirecting (type: modules) junipernetworks.junos.junos_command to juniper.device.junos_command
Using module file /Users/ruchi/myenv-python312/ansible-junos-stdlib/ansible_collections/juniper/device/plugins/modules/junos_command.py
Pipelining is enabled.
<10.0.151.96> ESTABLISH LOCAL CONNECTION FOR USER: ruchi
<10.0.151.96> EXEC /bin/sh -c '/Users/ruchi/.virtualenvs/junosenv_test/bin/python && sleep 0'
ok: [10.0.151.96] => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
"show version"
],
"display": null,
"interval": 1,
"match": "all",
"retries": 10,
"rpcs": null,
"wait_for": [
"result[0] contains Hostname"
]
}
},
"stdout": [
"Hostname: 10.0.151.96\nModel: vsrx\nJunos: 18.4R1.8\nJUNOS OS Kernel 64-bit [20181207.6c2f68b_2_builder_stable_11]\nJUNOS OS libs [20181207.6c2f68b_2_builder_stable_11]\nJUNOS OS runtime [20181207.6c2f68b_2_builder_stable_11]\nJUNOS OS time zone information [20181207.6c2f68b_2_builder_stable_11]\nJUNOS OS libs compat32 [20181207.6c2f68b_2_builder_stable_11]\nJUNOS OS 32-bit compatibility [20181207.6c2f68b_2_builder_stable_11]\nJUNOS py extensions [20181217.004159_builder_junos_184_r1]\nJUNOS py base [20181217.004159_builder_junos_184_r1]\nJUNOS OS vmguest [20181207.6c2f68b_2_builder_stable_11]\nJUNOS OS crypto [20181207.6c2f68b_2_builder_stable_11]\nJUNOS network stack and utilities [20181217.004159_builder_junos_184_r1]\nJUNOS libs [20181217.004159_builder_junos_184_r1]\nJUNOS libs compat32 [20181217.004159_builder_junos_184_r1]\nJUNOS runtime [20181217.004159_builder_junos_184_r1]\nJUNOS Web Management Platform Package [20181217.004159_builder_junos_184_r1]\nJUNOS srx libs compat32 [20181217.004159_builder_junos_184_r1]\nJUNOS srx runtime [20181217.004159_builder_junos_184_r1]\nJUNOS srx platform support [20181217.004159_builder_junos_184_r1]\nJUNOS common platform support [20181217.004159_builder_junos_184_r1]\nJUNOS srxtvp runtime [20181217.004159_builder_junos_184_r1]\nJUNOS pppoe [20181217.004159_builder_junos_184_r1]\nJUNOS mtx network modules [20181217.004159_builder_junos_184_r1]\nJUNOS modules [20181217.004159_builder_junos_184_r1]\nJUNOS srxtvp modules [20181217.004159_builder_junos_184_r1]\nJUNOS srxtvp libs [20181217.004159_builder_junos_184_r1]\nJUNOS srx libs [20181217.004159_builder_junos_184_r1]\nJUNOS srx Data Plane Crypto Support [20181217.004159_builder_junos_184_r1]\nJUNOS daemons [20181217.004159_builder_junos_184_r1]\nJUNOS srx daemons [20181217.004159_builder_junos_184_r1]\nJUNOS SRX TVP AppQos Daemon [20181217.004159_builder_junos_184_r1]\nJUNOS High End AppQos Daemon [20181217.004159_builder_junos_184_r1]\nJUNOS Extension Toolkit [20181217.004159_builder_junos_184_r1]\nJUNOS Phone-home [20181217.004159_builder_junos_184_r1]\nJUNOS J-Insight [20181217.004159_builder_junos_184_r1]\nJUNOS Online Documentation [20181217.004159_builder_junos_184_r1]\nJUNOS jail runtime [20181207.6c2f68b_2_builder_stable_11]\nJUNOS FIPS mode utilities [20181217.004159_builder_junos_184_r1]"
],
"stdout_lines": [
[
"Hostname: 10.0.151.96",
"Model: vsrx",
"Junos: 18.4R1.8",
"JUNOS OS Kernel 64-bit [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS OS libs [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS OS runtime [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS OS time zone information [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS OS libs compat32 [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS OS 32-bit compatibility [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS py extensions [20181217.004159_builder_junos_184_r1]",
"JUNOS py base [20181217.004159_builder_junos_184_r1]",
"JUNOS OS vmguest [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS OS crypto [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS network stack and utilities [20181217.004159_builder_junos_184_r1]",
"JUNOS libs [20181217.004159_builder_junos_184_r1]",
"JUNOS libs compat32 [20181217.004159_builder_junos_184_r1]",
"JUNOS runtime [20181217.004159_builder_junos_184_r1]",
"JUNOS Web Management Platform Package [20181217.004159_builder_junos_184_r1]",
"JUNOS srx libs compat32 [20181217.004159_builder_junos_184_r1]",
"JUNOS srx runtime [20181217.004159_builder_junos_184_r1]",
"JUNOS srx platform support [20181217.004159_builder_junos_184_r1]",
"JUNOS common platform support [20181217.004159_builder_junos_184_r1]",
"JUNOS srxtvp runtime [20181217.004159_builder_junos_184_r1]",
"JUNOS pppoe [20181217.004159_builder_junos_184_r1]",
"JUNOS mtx network modules [20181217.004159_builder_junos_184_r1]",
"JUNOS modules [20181217.004159_builder_junos_184_r1]",
"JUNOS srxtvp modules [20181217.004159_builder_junos_184_r1]",
"JUNOS srxtvp libs [20181217.004159_builder_junos_184_r1]",
"JUNOS srx libs [20181217.004159_builder_junos_184_r1]",
"JUNOS srx Data Plane Crypto Support [20181217.004159_builder_junos_184_r1]",
"JUNOS daemons [20181217.004159_builder_junos_184_r1]",
"JUNOS srx daemons [20181217.004159_builder_junos_184_r1]",
"JUNOS SRX TVP AppQos Daemon [20181217.004159_builder_junos_184_r1]",
"JUNOS High End AppQos Daemon [20181217.004159_builder_junos_184_r1]",
"JUNOS Extension Toolkit [20181217.004159_builder_junos_184_r1]",
"JUNOS Phone-home [20181217.004159_builder_junos_184_r1]",
"JUNOS J-Insight [20181217.004159_builder_junos_184_r1]",
"JUNOS Online Documentation [20181217.004159_builder_junos_184_r1]",
"JUNOS jail runtime [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS FIPS mode utilities [20181217.004159_builder_junos_184_r1]"
]
]
}
TASK [Assert wait_for with positive match passed] ******************************
task path: /Users/ruchi/myenv-python312/junos_new.yaml:26
ok: [10.0.151.96] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [Run multiple commands] ***************************************************
task path: /Users/ruchi/myenv-python312/junos_new.yaml:32
redirecting (type: modules) junipernetworks.junos.junos_command to juniper.device.junos_command
redirecting (type: modules) junipernetworks.junos.junos_command to juniper.device.junos_command
Using module file /Users/ruchi/myenv-python312/ansible-junos-stdlib/ansible_collections/juniper/device/plugins/modules/junos_command.py
Pipelining is enabled.
<10.0.151.96> ESTABLISH LOCAL CONNECTION FOR USER: ruchi
<10.0.151.96> EXEC /bin/sh -c '/Users/ruchi/.virtualenvs/junosenv_test/bin/python && sleep 0'
ok: [10.0.151.96] => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
"show version",
"show interfaces terse"
],
"display": null,
"interval": 1,
"match": "all",
"retries": 10,
"rpcs": null,
"wait_for": null
}
},
"stdout": [
"Hostname: 10.0.151.96\nModel: vsrx\nJunos: 18.4R1.8\nJUNOS OS Kernel 64-bit [20181207.6c2f68b_2_builder_stable_11]\nJUNOS OS libs [20181207.6c2f68b_2_builder_stable_11]\nJUNOS OS runtime [20181207.6c2f68b_2_builder_stable_11]\nJUNOS OS time zone information [20181207.6c2f68b_2_builder_stable_11]\nJUNOS OS libs compat32 [20181207.6c2f68b_2_builder_stable_11]\nJUNOS OS 32-bit compatibility [20181207.6c2f68b_2_builder_stable_11]\nJUNOS py extensions [20181217.004159_builder_junos_184_r1]\nJUNOS py base [20181217.004159_builder_junos_184_r1]\nJUNOS OS vmguest [20181207.6c2f68b_2_builder_stable_11]\nJUNOS OS crypto [20181207.6c2f68b_2_builder_stable_11]\nJUNOS network stack and utilities [20181217.004159_builder_junos_184_r1]\nJUNOS libs [20181217.004159_builder_junos_184_r1]\nJUNOS libs compat32 [20181217.004159_builder_junos_184_r1]\nJUNOS runtime [20181217.004159_builder_junos_184_r1]\nJUNOS Web Management Platform Package [20181217.004159_builder_junos_184_r1]\nJUNOS srx libs compat32 [20181217.004159_builder_junos_184_r1]\nJUNOS srx runtime [20181217.004159_builder_junos_184_r1]\nJUNOS srx platform support [20181217.004159_builder_junos_184_r1]\nJUNOS common platform support [20181217.004159_builder_junos_184_r1]\nJUNOS srxtvp runtime [20181217.004159_builder_junos_184_r1]\nJUNOS pppoe [20181217.004159_builder_junos_184_r1]\nJUNOS mtx network modules [20181217.004159_builder_junos_184_r1]\nJUNOS modules [20181217.004159_builder_junos_184_r1]\nJUNOS srxtvp modules [20181217.004159_builder_junos_184_r1]\nJUNOS srxtvp libs [20181217.004159_builder_junos_184_r1]\nJUNOS srx libs [20181217.004159_builder_junos_184_r1]\nJUNOS srx Data Plane Crypto Support [20181217.004159_builder_junos_184_r1]\nJUNOS daemons [20181217.004159_builder_junos_184_r1]\nJUNOS srx daemons [20181217.004159_builder_junos_184_r1]\nJUNOS SRX TVP AppQos Daemon [20181217.004159_builder_junos_184_r1]\nJUNOS High End AppQos Daemon [20181217.004159_builder_junos_184_r1]\nJUNOS Extension Toolkit [20181217.004159_builder_junos_184_r1]\nJUNOS Phone-home [20181217.004159_builder_junos_184_r1]\nJUNOS J-Insight [20181217.004159_builder_junos_184_r1]\nJUNOS Online Documentation [20181217.004159_builder_junos_184_r1]\nJUNOS jail runtime [20181207.6c2f68b_2_builder_stable_11]\nJUNOS FIPS mode utilities [20181217.004159_builder_junos_184_r1]",
"Interface Admin Link Proto Local Remote\ndsc up up\nem0 up up\nem0.0 up up inet 128.0.0.1/2 \nem1 up up\nem1.32768 up up inet 192.168.1.2/24 \nem2 up down\nfti0 up up\nfxp0 up up\nfxp0.0 up up inet 10.0.151.96/22 \ngre up up\nipip up up\nirb up up\nlo0 up up\nlo0.16384 up up inet 127.0.0.1 --> 0/0\nlo0.16385 up up inet 10.0.0.1 --> 0/0\n 10.0.0.16 --> 0/0\n 128.0.0.1 --> 0/0\n 128.0.0.4 --> 0/0\n 128.0.1.16 --> 0/0\nlo0.32768 up up \nlsi up up\nmtun up up\npimd up up\npime up up\npp0 up up\nppd0 up up\nppe0 up up\nst0 up up\ntap up up\nvlan up down\nvtep up up"
],
"stdout_lines": [
[
"Hostname: 10.0.151.96",
"Model: vsrx",
"Junos: 18.4R1.8",
"JUNOS OS Kernel 64-bit [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS OS libs [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS OS runtime [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS OS time zone information [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS OS libs compat32 [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS OS 32-bit compatibility [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS py extensions [20181217.004159_builder_junos_184_r1]",
"JUNOS py base [20181217.004159_builder_junos_184_r1]",
"JUNOS OS vmguest [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS OS crypto [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS network stack and utilities [20181217.004159_builder_junos_184_r1]",
"JUNOS libs [20181217.004159_builder_junos_184_r1]",
"JUNOS libs compat32 [20181217.004159_builder_junos_184_r1]",
"JUNOS runtime [20181217.004159_builder_junos_184_r1]",
"JUNOS Web Management Platform Package [20181217.004159_builder_junos_184_r1]",
"JUNOS srx libs compat32 [20181217.004159_builder_junos_184_r1]",
"JUNOS srx runtime [20181217.004159_builder_junos_184_r1]",
"JUNOS srx platform support [20181217.004159_builder_junos_184_r1]",
"JUNOS common platform support [20181217.004159_builder_junos_184_r1]",
"JUNOS srxtvp runtime [20181217.004159_builder_junos_184_r1]",
"JUNOS pppoe [20181217.004159_builder_junos_184_r1]",
"JUNOS mtx network modules [20181217.004159_builder_junos_184_r1]",
"JUNOS modules [20181217.004159_builder_junos_184_r1]",
"JUNOS srxtvp modules [20181217.004159_builder_junos_184_r1]",
"JUNOS srxtvp libs [20181217.004159_builder_junos_184_r1]",
"JUNOS srx libs [20181217.004159_builder_junos_184_r1]",
"JUNOS srx Data Plane Crypto Support [20181217.004159_builder_junos_184_r1]",
"JUNOS daemons [20181217.004159_builder_junos_184_r1]",
"JUNOS srx daemons [20181217.004159_builder_junos_184_r1]",
"JUNOS SRX TVP AppQos Daemon [20181217.004159_builder_junos_184_r1]",
"JUNOS High End AppQos Daemon [20181217.004159_builder_junos_184_r1]",
"JUNOS Extension Toolkit [20181217.004159_builder_junos_184_r1]",
"JUNOS Phone-home [20181217.004159_builder_junos_184_r1]",
"JUNOS J-Insight [20181217.004159_builder_junos_184_r1]",
"JUNOS Online Documentation [20181217.004159_builder_junos_184_r1]",
"JUNOS jail runtime [20181207.6c2f68b_2_builder_stable_11]",
"JUNOS FIPS mode utilities [20181217.004159_builder_junos_184_r1]"
],
[
"Interface Admin Link Proto Local Remote",
"dsc up up",
"em0 up up",
"em0.0 up up inet 128.0.0.1/2 ",
"em1 up up",
"em1.32768 up up inet 192.168.1.2/24 ",
"em2 up down",
"fti0 up up",
"fxp0 up up",
"fxp0.0 up up inet 10.0.151.96/22 ",
"gre up up",
"ipip up up",
"irb up up",
"lo0 up up",
"lo0.16384 up up inet 127.0.0.1 --> 0/0",
"lo0.16385 up up inet 10.0.0.1 --> 0/0",
" 10.0.0.16 --> 0/0",
" 128.0.0.1 --> 0/0",
" 128.0.0.4 --> 0/0",
" 128.0.1.16 --> 0/0",
"lo0.32768 up up ",
"lsi up up",
"mtun up up",
"pimd up up",
"pime up up",
"pp0 up up",
"ppd0 up up",
"ppe0 up up",
"st0 up up",
"tap up up",
"vlan up down",
"vtep up up"
]
]
}
TASK [Assert multiple commands worked] *****************************************
task path: /Users/ruchi/myenv-python312/junos_new.yaml:39
ok: [10.0.151.96] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [Run show version with json output] ***************************************
task path: /Users/ruchi/myenv-python312/junos_new.yaml:45
redirecting (type: modules) junipernetworks.junos.junos_command to juniper.device.junos_command
redirecting (type: modules) junipernetworks.junos.junos_command to juniper.device.junos_command
Using module file /Users/ruchi/myenv-python312/ansible-junos-stdlib/ansible_collections/juniper/device/plugins/modules/junos_command.py
Pipelining is enabled.
<10.0.151.96> ESTABLISH LOCAL CONNECTION FOR USER: ruchi
<10.0.151.96> EXEC /bin/sh -c '/Users/ruchi/.virtualenvs/junosenv_test/bin/python && sleep 0'
ok: [10.0.151.96] => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
"show version"
],
"display": "json",
"interval": 1,
"match": "all",
"retries": 10,
"rpcs": null,
"wait_for": null
}
},
"stdout": [
"{\n \"software-information\" : [\n {\n \"host-name\" : [\n {\n \"data\" : \"10.0.151.96\"\n }\n ], \n \"product-model\" : [\n {\n \"data\" : \"vsrx\"\n }\n ], \n \"product-name\" : [\n {\n \"data\" : \"vsrx\"\n }\n ], \n \"junos-version\" : [\n {\n \"data\" : \"18.4R1.8\"\n }\n ], \n \"package-information\" : [\n {\n \"name\" : [\n {\n \"data\" : \"os-kernel\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS OS Kernel 64-bit [20181207.6c2f68b_2_builder_stable_11]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"os-libs\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS OS libs [20181207.6c2f68b_2_builder_stable_11]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"os-runtime\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS OS runtime [20181207.6c2f68b_2_builder_stable_11]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"zoneinfo\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS OS time zone information [20181207.6c2f68b_2_builder_stable_11]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"os-libs-compat32\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS OS libs compat32 [20181207.6c2f68b_2_builder_stable_11]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"os-compat32\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS OS 32-bit compatibility [20181207.6c2f68b_2_builder_stable_11]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"py-extensions\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS py extensions [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"py-base\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS py base [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"os-vmguest\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS OS vmguest [20181207.6c2f68b_2_builder_stable_11]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"os-crypto\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS OS crypto [20181207.6c2f68b_2_builder_stable_11]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"netstack\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS network stack and utilities [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-libs\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS libs [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-libs-compat32\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS libs compat32 [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-runtime\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS runtime [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"jweb-srxtvp\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS Web Management Platform Package [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-libs-compat32-platform\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS srx libs compat32 [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-runtime-platform\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS srx runtime [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-platform-platform\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS srx platform support [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-platform\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS common platform support [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-runtime-srxtvp\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS srxtvp runtime [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-pppoe\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS pppoe [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-net-platform\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS mtx network modules [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-modules\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS modules [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-modules-platform\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS srxtvp modules [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-libs-srxtvp\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS srxtvp libs [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-libs-platform\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS srx libs [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-dp-crypto-support-platform\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS srx Data Plane Crypto Support [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-daemons\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS daemons [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-daemons-platform\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS srx daemons [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-appsecure-tvp\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS SRX TVP AppQos Daemon [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-appsecure-he\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS High End AppQos Daemon [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"jsd-jet-1\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS Extension Toolkit [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"jphone-home\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS Phone-home [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"jinsight\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS J-Insight [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"jdocs\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS Online Documentation [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"jail-runtime\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS jail runtime [20181207.6c2f68b_2_builder_stable_11]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"fips-mode\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS FIPS mode utilities [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }\n ]\n }\n ]\n}"
],
"stdout_lines": [
[
"{",
" \"software-information\" : [",
" {",
" \"host-name\" : [",
" {",
" \"data\" : \"10.0.151.96\"",
" }",
" ], ",
" \"product-model\" : [",
" {",
" \"data\" : \"vsrx\"",
" }",
" ], ",
" \"product-name\" : [",
" {",
" \"data\" : \"vsrx\"",
" }",
" ], ",
" \"junos-version\" : [",
" {",
" \"data\" : \"18.4R1.8\"",
" }",
" ], ",
" \"package-information\" : [",
" {",
" \"name\" : [",
" {",
" \"data\" : \"os-kernel\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS OS Kernel 64-bit [20181207.6c2f68b_2_builder_stable_11]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"os-libs\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS OS libs [20181207.6c2f68b_2_builder_stable_11]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"os-runtime\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS OS runtime [20181207.6c2f68b_2_builder_stable_11]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"zoneinfo\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS OS time zone information [20181207.6c2f68b_2_builder_stable_11]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"os-libs-compat32\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS OS libs compat32 [20181207.6c2f68b_2_builder_stable_11]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"os-compat32\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS OS 32-bit compatibility [20181207.6c2f68b_2_builder_stable_11]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"py-extensions\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS py extensions [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"py-base\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS py base [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"os-vmguest\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS OS vmguest [20181207.6c2f68b_2_builder_stable_11]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"os-crypto\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS OS crypto [20181207.6c2f68b_2_builder_stable_11]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"netstack\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS network stack and utilities [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-libs\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS libs [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-libs-compat32\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS libs compat32 [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-runtime\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS runtime [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"jweb-srxtvp\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS Web Management Platform Package [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-libs-compat32-platform\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS srx libs compat32 [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-runtime-platform\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS srx runtime [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-platform-platform\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS srx platform support [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-platform\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS common platform support [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-runtime-srxtvp\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS srxtvp runtime [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-pppoe\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS pppoe [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-net-platform\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS mtx network modules [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-modules\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS modules [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-modules-platform\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS srxtvp modules [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-libs-srxtvp\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS srxtvp libs [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-libs-platform\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS srx libs [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-dp-crypto-support-platform\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS srx Data Plane Crypto Support [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-daemons\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS daemons [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-daemons-platform\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS srx daemons [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-appsecure-tvp\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS SRX TVP AppQos Daemon [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-appsecure-he\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS High End AppQos Daemon [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"jsd-jet-1\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS Extension Toolkit [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"jphone-home\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS Phone-home [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"jinsight\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS J-Insight [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"jdocs\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS Online Documentation [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"jail-runtime\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS jail runtime [20181207.6c2f68b_2_builder_stable_11]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"fips-mode\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS FIPS mode utilities [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }",
" ]",
" }",
" ]",
"}"
]
]
}
TASK [Assert json output is returned] ******************************************
task path: /Users/ruchi/myenv-python312/junos_new.yaml:51
ok: [10.0.151.96] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [Run RPC get-software-information] ****************************************
task path: /Users/ruchi/myenv-python312/junos_new.yaml:56
redirecting (type: modules) junipernetworks.junos.junos_command to juniper.device.junos_command
redirecting (type: modules) junipernetworks.junos.junos_command to juniper.device.junos_command
Using module file /Users/ruchi/myenv-python312/ansible-junos-stdlib/ansible_collections/juniper/device/plugins/modules/junos_command.py
Pipelining is enabled.
<10.0.151.96> ESTABLISH LOCAL CONNECTION FOR USER: ruchi
<10.0.151.96> EXEC /bin/sh -c '/Users/ruchi/.virtualenvs/junosenv_test/bin/python && sleep 0'
ok: [10.0.151.96] => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
"show version | display json"
],
"display": null,
"interval": 1,
"match": "all",
"retries": 10,
"rpcs": null,
"wait_for": null
}
},
"stdout": [
"{\n \"software-information\" : [\n {\n \"host-name\" : [\n {\n \"data\" : \"10.0.151.96\"\n }\n ], \n \"product-model\" : [\n {\n \"data\" : \"vsrx\"\n }\n ], \n \"product-name\" : [\n {\n \"data\" : \"vsrx\"\n }\n ], \n \"junos-version\" : [\n {\n \"data\" : \"18.4R1.8\"\n }\n ], \n \"package-information\" : [\n {\n \"name\" : [\n {\n \"data\" : \"os-kernel\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS OS Kernel 64-bit [20181207.6c2f68b_2_builder_stable_11]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"os-libs\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS OS libs [20181207.6c2f68b_2_builder_stable_11]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"os-runtime\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS OS runtime [20181207.6c2f68b_2_builder_stable_11]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"zoneinfo\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS OS time zone information [20181207.6c2f68b_2_builder_stable_11]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"os-libs-compat32\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS OS libs compat32 [20181207.6c2f68b_2_builder_stable_11]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"os-compat32\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS OS 32-bit compatibility [20181207.6c2f68b_2_builder_stable_11]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"py-extensions\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS py extensions [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"py-base\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS py base [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"os-vmguest\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS OS vmguest [20181207.6c2f68b_2_builder_stable_11]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"os-crypto\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS OS crypto [20181207.6c2f68b_2_builder_stable_11]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"netstack\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS network stack and utilities [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-libs\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS libs [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-libs-compat32\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS libs compat32 [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-runtime\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS runtime [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"jweb-srxtvp\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS Web Management Platform Package [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-libs-compat32-platform\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS srx libs compat32 [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-runtime-platform\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS srx runtime [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-platform-platform\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS srx platform support [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-platform\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS common platform support [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-runtime-srxtvp\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS srxtvp runtime [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-pppoe\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS pppoe [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-net-platform\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS mtx network modules [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-modules\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS modules [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-modules-platform\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS srxtvp modules [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-libs-srxtvp\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS srxtvp libs [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-libs-platform\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS srx libs [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-dp-crypto-support-platform\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS srx Data Plane Crypto Support [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-daemons\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS daemons [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-daemons-platform\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS srx daemons [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-appsecure-tvp\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS SRX TVP AppQos Daemon [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"junos-appsecure-he\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS High End AppQos Daemon [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"jsd-jet-1\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS Extension Toolkit [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"jphone-home\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS Phone-home [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"jinsight\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS J-Insight [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"jdocs\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS Online Documentation [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"jail-runtime\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS jail runtime [20181207.6c2f68b_2_builder_stable_11]\"\n }\n ]\n }, \n {\n \"name\" : [\n {\n \"data\" : \"fips-mode\"\n }\n ], \n \"comment\" : [\n {\n \"data\" : \"JUNOS FIPS mode utilities [20181217.004159_builder_junos_184_r1]\"\n }\n ]\n }\n ]\n }\n ]\n}"
],
"stdout_lines": [
[
"{",
" \"software-information\" : [",
" {",
" \"host-name\" : [",
" {",
" \"data\" : \"10.0.151.96\"",
" }",
" ], ",
" \"product-model\" : [",
" {",
" \"data\" : \"vsrx\"",
" }",
" ], ",
" \"product-name\" : [",
" {",
" \"data\" : \"vsrx\"",
" }",
" ], ",
" \"junos-version\" : [",
" {",
" \"data\" : \"18.4R1.8\"",
" }",
" ], ",
" \"package-information\" : [",
" {",
" \"name\" : [",
" {",
" \"data\" : \"os-kernel\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS OS Kernel 64-bit [20181207.6c2f68b_2_builder_stable_11]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"os-libs\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS OS libs [20181207.6c2f68b_2_builder_stable_11]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"os-runtime\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS OS runtime [20181207.6c2f68b_2_builder_stable_11]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"zoneinfo\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS OS time zone information [20181207.6c2f68b_2_builder_stable_11]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"os-libs-compat32\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS OS libs compat32 [20181207.6c2f68b_2_builder_stable_11]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"os-compat32\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS OS 32-bit compatibility [20181207.6c2f68b_2_builder_stable_11]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"py-extensions\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS py extensions [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"py-base\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS py base [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"os-vmguest\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS OS vmguest [20181207.6c2f68b_2_builder_stable_11]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"os-crypto\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS OS crypto [20181207.6c2f68b_2_builder_stable_11]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"netstack\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS network stack and utilities [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-libs\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS libs [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-libs-compat32\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS libs compat32 [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-runtime\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS runtime [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"jweb-srxtvp\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS Web Management Platform Package [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-libs-compat32-platform\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS srx libs compat32 [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-runtime-platform\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS srx runtime [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-platform-platform\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS srx platform support [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-platform\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS common platform support [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-runtime-srxtvp\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS srxtvp runtime [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-pppoe\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS pppoe [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-net-platform\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS mtx network modules [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-modules\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS modules [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-modules-platform\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS srxtvp modules [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-libs-srxtvp\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS srxtvp libs [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-libs-platform\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS srx libs [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-dp-crypto-support-platform\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS srx Data Plane Crypto Support [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-daemons\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS daemons [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-daemons-platform\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS srx daemons [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-appsecure-tvp\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS SRX TVP AppQos Daemon [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"junos-appsecure-he\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS High End AppQos Daemon [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"jsd-jet-1\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS Extension Toolkit [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"jphone-home\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS Phone-home [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"jinsight\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS J-Insight [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"jdocs\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS Online Documentation [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"jail-runtime\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS jail runtime [20181207.6c2f68b_2_builder_stable_11]\"",
" }",
" ]",
" }, ",
" {",
" \"name\" : [",
" {",
" \"data\" : \"fips-mode\"",
" }",
" ], ",
" \"comment\" : [",
" {",
" \"data\" : \"JUNOS FIPS mode utilities [20181217.004159_builder_junos_184_r1]\"",
" }",
" ]",
" }",
" ]",
" }",
" ]",
"}"
]
]
}
TASK [Assert RPC output] *******************************************************
task path: /Users/ruchi/myenv-python312/junos_new.yaml:62
ok: [10.0.151.96] => {
"changed": false,
"msg": "All assertions passed"
}
PLAY RECAP *********************************************************************
10.0.151.96 : ok=10 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment