I have Ansible playbooks that use the "ios_config" module to backup the 
config of my Cisco devices. Works fine on all my Ciscos except the terminal 
servers.

This makes total sense: when I ssh to one of our terminal servers, I don't 
get a CLI prompt. Instead, I'm immediately presented with a menu. The menu 
presents a list of device names, and prompts me for the number of the 
device I want serial access to. We've set up the special menu item number 3 
to mean "exit the menu, go to the terminal server's CLI". From then on, I 
can executes Cisco CLI commands just like on the other Ciscos.

So I need Ansible to emit a "3" immediately after connecting. To try to 
solve this, I have a device group in my inventory file named, 
"[terminalservers]". I have a special playbook for this group. It looks 
like the playbook I use on other Ciscos, except that it has an extra task 
uses the "raw" module to emit a "3".

It's not working. Am I on the right track? I looked at "ios_command" and 
"shell" and "expect", but it seems that "raw" is the right module for this. 
Currently, it just times out on the "raw" module.

Any suggestions are welcome.




-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/93a108cf-cdcc-4dec-89b0-3ef3d6a43266%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to