# Telnet module for ansible

**URL:** <https://forum.ansible.com/t/telnet-module-for-ansible/23742>\
**Category:** Ansible Project\
**Created:** [February 16, 2017, 3:15am UTC](https://forum.ansible.com/t/telnet-module-for-ansible/23742 "2017-02-16T03:15:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Madhu](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@Madhu](https://forum.ansible.com/u/Madhu)\
**Post date:** [February 16, 2017, 3:15am UTC](https://forum.ansible.com/t/telnet-module-for-ansible/23742/1 "2017-02-16T03:15:40Z")

</div>

Is there any telnet module available for Ansible?

I want to telnet to server and execute some command for a particular task. Any body please help?

---

<div class="post-metadata">

**Author:** ![Nehal\_J\_Wani](https://avatars.discourse-cdn.com/v4/letter/n/a9a28c/32.png) [@Nehal\_J\_Wani](https://forum.ansible.com/u/Nehal_J_Wani)\
**Post date:** [February 16, 2017, 11:32am UTC](https://forum.ansible.com/t/telnet-module-for-ansible/23742/2 "2017-02-16T11:32:01Z")

</div>

Maybe, use the expect module? [http://docs.ansible.com/ansible/expect\_module.html#status](http://docs.ansible.com/ansible/expect_module.html#status)

- hosts: localhost

tasks:

- expect:  
command: telnet localhost 8000  
responses:  
“Escape character is ‘\^]’.”: “GET / HTTP/1.1\rHost: localhost\r\n”  
“”: “\x1d”  
“telnet\>”: “quit”  
ignore\_errors: yes
