ansible-junos-stdlib icon indicating copy to clipboard operation
ansible-junos-stdlib copied to clipboard

RPC "get-system-core-dumps" with formats "text" only prints the first line of rpc-reply

Open chidanandpujar opened this issue 2 years ago • 2 comments

Issue Type

  • Bug Report

Module Name

juniper.device.rpc

juniper.device collection and Python libraries version

junos-eznc 2.6.6

ansible-junos-stdlib v1.0.2-collections

OS / Environment

All-junos

Summary

RPC "get-system-core-dumps" prints with formats "text" only prints the first line of rpc-reply with formats "text" <

Steps to reproduce

yml file


  • name: Router Upgrade hosts: all ignore_unreachable: true gather_facts: false vars: ansible_host_key_checking: false ansible_connection: local

    tasks:

    • name: Show system core dumps juniper.device.rpc: rpcs: - "get-system-core-dumps" formats: - "text" register: core_dumps

    • name: Print system alarm information debug: msg: "{{ core_dumps }}"

Run the playbook ansible-playbook test_core.yml

Expected results

show system core-dumps /var/crash/core: No such file or directory /var/tmp/core: No such file or directory /var/tmp/pics/core: No such file or directory /var/crash/kernel.*: No such file or directory /var/jails/rest-api/tmp/core: No such file or directory /tftpboot/corefiles/core: No such file or directory

Actual results

ok: [test] => { "msg": { "attrs": null, "changed": false, "failed": false, "format": "text", "kwargs": null, "msg": "The RPC executed successfully.", "rpc": "get-system-core-dumps", "stdout": "\n/var/crash/core: No such file or directory\n", "stdout_lines": [ "", "/var/crash/core: No such file or directory" ] } }

chidanandpujar avatar May 05 '23 04:05 chidanandpujar