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"
          "</html>": "\x1d"
          "telnet>": "quit"
      ignore_errors: yes

On Thu, Feb 16, 2017 at 8:45 AM, Madhusudhanan Santhanam <
[email protected]> wrote:

> 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?
>
> --
> 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/ms
> gid/ansible-project/5ef499f6-3ed3-4b0f-a6bf-62e615feecd5%
> 40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/5ef499f6-3ed3-4b0f-a6bf-62e615feecd5%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Nehal J Wani

-- 
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/CAG6NSrkq2OncmQYa_a8R%3Dw-OJK_4s16wCAe9dFfkuo3KVRsofw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to