From 33b8d7069fa8bdccf7a849cf6e55193a011a9063 Mon Sep 17 00:00:00 2001 From: hiddenicon Date: Mon, 18 Sep 2017 05:29:11 -0400 Subject: [PATCH] Add _ and . to regex (#30396) Adding underscore and period to the nxos regex for determining the prompt for hostnames with underscores and periods in the hostname. --- lib/ansible/plugins/terminal/nxos.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/plugins/terminal/nxos.py b/lib/ansible/plugins/terminal/nxos.py index ef4fb63a949..22ca2adcea4 100644 --- a/lib/ansible/plugins/terminal/nxos.py +++ b/lib/ansible/plugins/terminal/nxos.py @@ -28,8 +28,8 @@ from ansible.errors import AnsibleConnectionFailure class TerminalModule(TerminalBase): terminal_stdout_re = [ - re.compile(br'[\r\n]?[a-zA-Z]{1}[a-zA-Z0-9-]*[>|#|%](?:\s*)$'), - re.compile(br'[\r\n]?[a-zA-Z]{1}[a-zA-Z0-9-]*\(.+\)#(?:\s*)$') + re.compile(br'[\r\n]?[a-zA-Z]{1}[a-zA-Z0-9-_.]*[>|#|%](?:\s*)$'), + re.compile(br'[\r\n]?[a-zA-Z]{1}[a-zA-Z0-9-_.]*\(.+\)#(?:\s*)$') ] terminal_stderr_re = [