I am trying to perform telnet which works fine with username & password but i want to find a way to enter enable password. Below example does not work.
I was able to make it work but now after successful execution, it does not make changes on the end device but result says changes are done.
root@NetworkAutomation-2:~# cat telnettest.yml
Thank you for the response but i am working on TELNET not SSH.
I am able to telnet the router but changes are not taking effect.
can any expert guide here?
Hi,
Because I have no cisco device on handy, I “guess” this may work!
Add “Password:” (after “enable” command) as a valid prompt.
prompts:
Reference page:https://qiita.com/Yohichi_Hayashi/items/772ea6b1e66d4cc8aa26`
sincerely,
Jane#
Ankur Atri於 2019年7月5日星期五 UTC+8下午12時37分34秒寫道:
Hi Ankur,
I had the same problem with some old hardware, and found, after studying the code 1, that the following solution works:
- name: run show commands
hosts: routers
gather_facts: false
connection: local
tasks:
- telnet:
login_prompt: "Password: "
user: “{{ password }}”
prompts:
Cheers,
Chris Chapman