On Mon, Apr 13, 2020 at 01:37:13AM -0700, Zaldy B wrote:
> playbook is just straight forward:
>
>
> ---
> - name: Telnet do show version for IOS
> hosts: Cisco_Telnet
> gather_facts: false
> connection: local
>
> tasks:
> - name: show version
> telnet:
> user: "{{ username }}"
> password: "{{ password }}"
> login_prompt: "Username:"
> prompts:
> - "[>|#]"
> command:
> - terminal length 0
> - show version
>
>
> hostfile:
>
> [Cisco_Telnet]
> cisco_device host=192.168.1.1 username=cisco password=cisco
This looks like a playbook just copied from documentation.
https://docs.ansible.com/ansible/latest/modules/telnet_module.html
Your task is missing host: default is the variable remote_addr according to the
documentation. So you need to provide host: or sett the correct variable.
You also need to tailor the prompt for you environment, it should be a list of
all prompt, you only have one prompt that is literally checking for [>|#] I
doubt you prompt looks like that.
If you can't figure this out yourself you need to provide the complete output
of telnet including telnet itself and the exit of the telnet.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/20200416063223.ripv6dkloy2els5w%40olstad.com.