Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli_parse not execute command on remote host #347

Open
slefol opened this issue Apr 3, 2024 · 0 comments
Open

cli_parse not execute command on remote host #347

slefol opened this issue Apr 3, 2024 · 0 comments

Comments

@slefol
Copy link

slefol commented Apr 3, 2024

SUMMARY

the module ansible.utils.cli_parse fails on network device with error "/bin/sh: 1: show: not found\n".

ISSUE TYPE
  • Bug Report
COMPONENT NAME

cli_parse

ANSIBLE VERSION
ansible [core 2.16.5]
  config file = /home/ansible/ansible_network/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /root/ansible-venv/lib/python3.11/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /root/ansible-venv/bin/ansible
  python version = 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] (/root/ansible-venv/bin/python3)
  jinja version = 3.1.3
  libyaml = True
COLLECTION VERSION
Collection            Version
--------------------- -------
ansible.netcommon     6.0.0
ansible.posix         1.5.4
ansible.utils         3.1.0
community.general     8.5.0
CONFIGURATION
OS / ENVIRONMENT
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: cisco.ios.ios
ansible_network_cli_ssh_type: paramiko

Cisco C2960, 12.2(55)SE12
Cisco C2960X, 15.2(7)E3
Cisco C9200L, 17.3.4

STEPS TO REPRODUCE
ansible sw-sl.montet -m ansible.utils.cli_parse -a '{"command":"show version","parser":{"name":"ansible.netcommon.native"}}' -i inventories/sites/
EXPECTED RESULTS

the module works as expected with ansible.utils colection v.2.12.2, 3.0.0
it doesnt't work with ansible.utils colection v.3.1.0 and 4.0.0

ACTUAL RESULTS
sw-sl.montet | FAILED! => {
    "changed": false,
    "msg": "/bin/sh: 1: show: not found\n",
    "stdout": "",
    "stdout_lines": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant