Hello,
Im trying to figure out how to use ansible.builtin.raw module with cisco devices.
On previous ansible version it would communicate with cisco ios on its own somehow but not since I upgraded to ansible [core 2.15.6].
now I keep getting shell error and I cant find documentation on how to select cisco shell.
1 │ —
2 │ - name: ARP
3 │ hosts: all
4 │ gather_facts: false
5 │ connection: ansible.netcommon.network_cli
6 │ vars:
7 │ ansible_network_os: cisco.ios.ios
8 │
9 │ tasks:
10 │ - name: Show ARP
11 │ ansible.builtin.raw: “show arp”
12 │ register: print_output
13 │
14 │ - name: Print out verbose
15 │ ansible.builtin.debug: var=print_output.stdout_lines
ap raw/arp.yml
PLAY [ARP] ***********************************************************************************************************************************************
TASK [Show ARP] ******************************************************************************************************************************************
fatal: [3750g]: FAILED! => {“changed”: true, “msg”: “non-zero return code”, “rc”: 127, “stderr”: “/bin/sh: 1: show: not found\n”, “stderr_lines”: [“/bin/sh: 1: show: not found”], “stdout”: “”, “stdout_lines”: }
fatal: [2960g]: FAILED! => {“changed”: true, “msg”: “non-zero return code”, “rc”: 127, “stderr”: “/bin/sh: 1: show: not found\n”, “stderr_lines”: [“/bin/sh: 1: show: not found”], “stdout”: “”, “stdout_lines”: }
PLAY RECAP ***********************************************************************************************************************************************
2960g : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
3750g : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0