You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using telnet to connect to a Procurve switch fails because the switch expects a "any key" to continue (nag banner)
It seems the cli_command has a fix for this with ansible_terminal_initial_prompt.
I don't belief this is a issue only with this type of switch, but can be any device with a (nag) banner that requires a input.
the send_newline: true doesn't seem to work, or the command is sended to quickly.
fatal: [switch]: FAILED! => {"changed": true, "msg": "Telnet timed out trying to find prompt(s): '['Username: ']'", "stdout": "\u001b[2J\u001b[?7l\u001b[3;23r\u001b[?6l\u001b[1;1H\u001b[?25l\u001b[1;1HProCurve J9280A Switch 2510G-48\r\n\rSoftware revision Y.11.08\r\n\r\r\n\rCopyright (C) 1991-2008 Hewlett-Packard Co. All Rights Reserved.\n\r\n\r RESTRICTED RIGHTS LEGEND\n\r\n\r Use, duplication, or disclosure by the Government is subject to restrictions\n\r as set forth in subdivision (b) (3) (ii) of the Rights in Technical Data and\n\r Computer Software clause at 52.227-7013.\n\r\n\r HEWLETT-PACKARD COMPANY, 3000 Hanover St., Palo Alto, CA 94303\n\r\n\rWe'd like to keep you up to date about:\n\r * Software feature updates\n\r * New product announcements\n\r * Special events\n\r\n\rPlease register your products now at: www.ProCurve.com\n\r\n\r\n\r\u001b[24;1HPress any key to continue\u001b[1;1H\u001b[?25h\u001b[24;27H", "stdout_lines": ["\u001b[2J\u001b[?7l\u001b[3;23r\u001b[?6l\u001b[1;1H\u001b[?25l\u001b[1;1HProCurve J9280A Switch 2510G-48\r\n", "\r", "Software revision Y.11.08\r\n", "\r", "\r\n", "\r", "Copyright (C) 1991-2008 Hewlett-Packard Co. All Rights Reserved.\n", "\r\n", "\r", " RESTRICTED RIGHTS LEGEND\n", "\r\n", "\r", " Use, duplication, or disclosure by the Government is subject to restrictions\n", "\r", " as set forth in subdivision (b) (3) (ii) of the Rights in Technical Data and\n", "\r", " Computer Software clause at 52.227-7013.\n", "\r\n", "\r", " HEWLETT-PACKARD COMPANY, 3000 Hanover St., Palo Alto, CA 94303\n", "\r\n", "\r", "We'd like to keep you up to date about:\n", "\r", " * Software feature updates\n", "\r", " * New product announcements\n", "\r", " * Special events\n", "\r\n", "\r", "Please register your products now at: www.ProCurve.com\n", "\r\n", "\r\n", "\r", "\u001b[24;1HPress any key to continue\u001b[1;1H\u001b[?25h\u001b[24;27H"]}
telnet session:
ProCurve J9280A Switch 2510G-48
Software revision Y.11.08
Copyright (C) 1991-2008 Hewlett-Packard Co. All Rights Reserved.
RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the Government is subject to restrictions
as set forth in subdivision (b) (3) (ii) of the Rights in Technical Data and
Computer Software clause at 52.227-7013.
HEWLETT-PACKARD COMPANY, 3000 Hanover St., Palo Alto, CA 94303
We'd like to keep you up to date about:
* Software feature updates
* New product announcements
* Special events
Please register your products now at: www.ProCurve.com
Press any key to continue
The text was updated successfully, but these errors were encountered:
---
- hosts: switchorder: inventorygather_facts: falseconnection: localtasks:
- name: Gather switch config and informationansible.netcommon.telnet:
user: "\n<user>"<<<< newline first, then write username to consolepassword: <snip>login_prompt: 'Press any key to continue'password_prompt: 'Password: 'send_newline: truetimeout: 7pause: 2prompts:
- '[>|#]'command:
- no page
- show config
- show lldp info local
- exit
SUMMARY
Using telnet to connect to a Procurve switch fails because the switch expects a "any key" to continue (nag banner)
It seems the cli_command has a fix for this with
ansible_terminal_initial_prompt
.I don't belief this is a issue only with this type of switch, but can be any device with a (nag) banner that requires a input.
the
send_newline: true
doesn't seem to work, or the command is sended to quickly.ISSUE TYPE
COMPONENT NAME
ansible.netcommon.telnet
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Ubuntu 22.04.2 LTS
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
telnet session:
The text was updated successfully, but these errors were encountered: