Telnet module for ansible

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?

Maybe, use the expect module? 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