How do I run commands such as against generic network devices

All,

I’m just beginning discovery of using ansible in my environment, and am trying to get an understanding of its capabilities.

I’ve been trying to figure out how to send command to generic network devices. That is devices with no module, and not an option in ansible_network_os. For example, old HP Procurve switches, or menu driven devices such as Adtran muxes.

I assume I’ll be a little limited to what I can do, but I would think that raw and/or expect could be made to work

The errors I’m getting are similar to:


“stderr”: “/bin/sh: 1: -c not found\n”,

I’ve tried it adhoc like:

ansible TEST -c local -u username -k -m raw -a “show run” # Not the actual command, I’m doing it from memory

or in a playbook such as:

raw might work depending on device, but expect will always work as long as the device give some kind out prompt.