On Friday, 17 November 2017 22.38.48 CET ayyappan ramanan wrote:
> I am unsure if this question has been raised before. I use Ansible for 
> network automation and it has been working great so far.
> 
> I am trying to use Ansible/Ansible Tower to automate a virtual network lab 
> on GNS3. As you may be aware already, GNS3 provides a sleak Out-of-the-band 
> management by tying the console ports of virtualised router and switch 
> instances over a telnet port. Application users can telnet on to that port 
> to configure the virtual network to suit their needs.
> 
> When I access my labs manually, when I am done working, I need to use a 
> Break Sequence of 'Ctrl + ]' and exit the terminal
> 
> With Ansible, when ever I have to telnet on to a network device through its 
> VTY line, I use RAW and PARAMIKO modules.
> 
> My question is which module do I use in my ansible playbook and how do I 
> send 'Ctrl + ]' or any hot key combination for that matter to my target 
> device.
> 
> Any thoughts/suggestions?

If you use expect it is possible, if it work with Ansible's expect module I 
don't now, you need to try.

The expect sequence for Ctrl + ] is "\x1d" and you need to keep the double 
quotes around it in Ansible for it to work.


-- 
Kai Stian Olstad

-- 
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/1572389.E8bD87bH08%40x1.
For more options, visit https://groups.google.com/d/optout.

Reply via email to