# Raw module shell selection

**URL:** <https://forum.ansible.com/t/raw-module-shell-selection/2444>\
**Category:** Get Help\
**Tags:** playbook, documentation, ansible-core\
**Created:** [November 18, 2023, 4:08am UTC](https://forum.ansible.com/t/raw-module-shell-selection/2444 "2023-11-18T04:08:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![johntxjw](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/johntxjw/32/3520_2.png) [@johntxjw](https://forum.ansible.com/u/johntxjw)\
**Post date:** [November 18, 2023, 4:08am UTC](https://forum.ansible.com/t/raw-module-shell-selection/2444/1 "2023-11-18T04:08:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jbericat](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jbericat/32/627_2.png) [@jbericat](https://forum.ansible.com/u/jbericat)\
**Post date:** [November 20, 2023, 2:19pm UTC](https://forum.ansible.com/t/raw-module-shell-selection/2444/2 "2023-11-20T14:19:25Z")

</div>

Hello @johntxjw ,

Is there any specific reason you’re using the `ansible.builtin.raw` module? Because I’d use the [ansible.netcommon.cli\_command](https://galaxy.ansible.com/ui/repo/published/ansible/netcommon/content/module/cli_command/?extIdCarryOver=true&sc_cid=701f2000001OH7YAAW) instead…

Cheers

---

<div class="post-metadata">

**Author:** ![johntxjw](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/johntxjw/32/3520_2.png) [@johntxjw](https://forum.ansible.com/u/johntxjw)\
**Post date:** [December 2, 2023, 11:22pm UTC](https://forum.ansible.com/t/raw-module-shell-selection/2444/3 "2023-12-02T23:22:53Z")

</div>

Hello again,

I recently starting to use ansible with my home lab and tutorial I’ve been viewing start of by using raw module/ad-hoc to learn ansible, but other than that no particular reason.  
I have been having a escalation issue with ioscommand module but I will create another help topic for that.

Thanks again

---

<div class="post-metadata">

**Author:** ![jbericat](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jbericat/32/627_2.png) [@jbericat](https://forum.ansible.com/u/jbericat)\
**Post date:** [December 2, 2023, 11:39pm UTC](https://forum.ansible.com/t/raw-module-shell-selection/2444/4 "2023-12-02T23:39:35Z")

</div>

Hi @johntxjw,

Thank you for the clarification provided.

Could I kindly request you to mark this topic as solved? This will help maintain organization within the forum’s “get-help” category, showcasing the original post as resolved. Your assistance with this is greatly appreciated! 😊

Looking forward to future interactions! See you around!

Best regards

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [January 1, 2024, 11:40pm UTC](https://forum.ansible.com/t/raw-module-shell-selection/2444/5 "2024-01-01T23:40:04Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
