On Tuesday, 13 March 2018 21.05.41 CET Samuel Sutton wrote:
> Hey Kai,
> Thanks for the reply. Is the same thing happening with expect playbook that
> I made to try to telnet?
No, telnet is interactive, the problem you have now is wrong syntax.
> - hosts: localhost
> connection: local
> gather_facts: false
> - name: Expect Attempt
> echo: yes
> command: telnet 10.233.82.7 2033
> - Connected to port* "echo"
> - login: "admin"
> - Password: "password"
Question is the text/prompt/question you are checking for, it's not a directive
for the expect module.
- name: Expect Attempt
command: telnet 10.233.82.7 2033
When expect sees login in the output it will type admin and press ENTER and
type password when it sees Password or password since the expect module is case
insensitive by default.
I don't understand what you tried to do with 'Connected to port* "echo"'
You should also check out this tread for just a few days ago that address the
same problem you are having now.
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 post to this group, send email to email@example.com.
To view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.