ansible / ansible-modules-core

Ansible modules - these modules ship with ansible
1.3k stars 1.95k forks source link

ios_command failure for cisco with rc=1 #5919

Closed vvs1987 closed 7 years ago

vvs1987 commented 7 years ago

i am trying to run a simple ios_command :+1:

when running on the router it runs properly but gives error when using ansible . output is as follow: task path: /tmp/testing/networking/roles/prevalidations/tasks/main.yml:26 fatal: []: FAILED! => { "changed": false, "failed": true, "invocation": { "module_args": { "auth_pass": null, "authorize": null, "commands": [ "sh ip bgp neighbors xxx.xxx.xxx.xxx advertised-routes" ], "host": null, "interval": 1, "match": "all", "password": null, "port": null, "provider": { "auth_pass": null, "authorize": true, "host": "***", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "port": null, "ssh_keyfile": null, "timeout": null, "transport": "cli", "username": "fc.abc" }, "retries": 10, "ssh_keyfile": null, "timeout": null, "username": null, "wait_for": null } }, "msg": "ditional-path, c RIB-compressed, \r\nOrigin codes: i - IGP, e - EGP, ? - incomplete\r\nRPKI validation codes: V valid, I invalid, N Not found\r\n\r\n Network Next Hop Metric LocPrf Weight Path\r\n *> xxx.xxx.xxx.x 0.0.0.0 ", "rc": 1 } ...ignoring Tuesday 25 July 2017 07:34:56 +0000 (0:00:03.013) 0:00:03.109

TASK [prevalidations : debug] ** task path: /tmp/vibhav_testing/networking/roles/prevalidations/tasks/main.yml:34 fatal: []: FAILED! => { "failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'dict object' has no attribute 'stdout'\n\nThe error appears to have been in '/tmp/vibhav_testing/networking/roles/prevalidations/tasks/main.yml': line 34, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- debug:\n ^ here\n" }

here the output comes similar to one run on hostmachine but incomplete and cisco returns rc=1 .

please help .

vvs1987 commented 7 years ago

Ansible Version is 2.3.1 and 2.3.0

ansibot commented 7 years ago

This repository has been locked. All new issues and pull requests should be filed in https://github.com/ansible/ansible

Please read through the repomerge page in the dev guide.