Open mahoutukaisali opened 10 months ago
@mahoutukaisali , We could not reproduce this , is it possible for you to share the CLI command output?
request support information
@rohitthakur2590 , I originally opened the case through RH support. Unfortunately I am unable to share the full "request support information" publicly due to sensitive information, however the issue may originate from the command returning the "error" keyword which is caught by the ansible module as an error hence exit.
Please try to run the junos_command with a command that returns error and validate the output. I have noticed that in the last year the collection version has been updated considerably. We are planning to move to a newer versions, however this is not planned for the current quarter.
An example of a cli command
root@labrt-RE4> show services nat mappings summary
root@labrt-RE4> show services nat pool
root@labrt-RE4> show services nat pool detail
root@labrt-RE4> show services advanced-anti-malware status
error: syntax error, expecting <command>: advanced-anti-malware
root@labrt-RE4> show services advanced-anti-malware statistics
error: syntax error, expecting <command>: advanced-anti-malware
{master}
SUMMARY
junipernetworks.junos.junos_command
module regards the task status as "failed" whenrequest support information
command output includes specific keywords likesyntax error
.ISSUE TYPE
COMPONENT NAME
junipernetworks.junos.junos_command
ANSIBLE VERSION
COLLECTION VERSION
STEPS TO REPRODUCE
Junos
. As you can see in the execution logs below, theshow services advanced-anti-malware
command is launched by therequest support information
command in Junos, but it fails due to a syntax error. While this is likely a bug in Junos, therequest support information
command itself succeeds, so I believe the Ansible task should be considered successful.EXPECTED RESULTS
request support information
command itself is successful.ACTUAL RESULTS