# Sending Break/Escape Sequence hot keys via a play

**URL:** <https://forum.ansible.com/t/sending-break-escape-sequence-hot-keys-via-a-play/26068>\
**Category:** Ansible Project\
**Created:** [November 17, 2017, 9:38pm UTC](https://forum.ansible.com/t/sending-break-escape-sequence-hot-keys-via-a-play/26068 "2017-11-17T21:38:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayyappan\_ramanan](https://avatars.discourse-cdn.com/v4/letter/a/8c91f0/32.png) [@ayyappan\_ramanan](https://forum.ansible.com/u/ayyappan_ramanan)\
**Post date:** [November 17, 2017, 9:38pm UTC](https://forum.ansible.com/t/sending-break-escape-sequence-hot-keys-via-a-play/26068/1 "2017-11-17T21:38:48Z")

</div>

Hi All,

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?

Thanks,  
AR

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [November 17, 2017, 10:10pm UTC](https://forum.ansible.com/t/sending-break-escape-sequence-hot-keys-via-a-play/26068/2 "2017-11-17T22:10:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ayyappan\_ramanan](https://avatars.discourse-cdn.com/v4/letter/a/8c91f0/32.png) [@ayyappan\_ramanan](https://forum.ansible.com/u/ayyappan_ramanan)\
**Post date:** [November 17, 2017, 11:55pm UTC](https://forum.ansible.com/t/sending-break-escape-sequence-hot-keys-via-a-play/26068/3 "2017-11-17T23:55:13Z")

</div>

Awesome. Will try and let you know. Thanks for your time.
