diff --git a/lib/ansible/plugins/terminal/ios.py b/lib/ansible/plugins/terminal/ios.py index 37d3ff4bc5..5a39acf06d 100644 --- a/lib/ansible/plugins/terminal/ios.py +++ b/lib/ansible/plugins/terminal/ios.py @@ -80,9 +80,3 @@ class TerminalModule(TerminalBase): self._exec_cli_command('disable') - @staticmethod - def guess_network_os(conn): - stdin, stdout, stderr = conn.exec_command('show version') - if 'Cisco IOS Software' in stdout.read(): - return 'ios' - diff --git a/lib/ansible/plugins/terminal/iosxr.py b/lib/ansible/plugins/terminal/iosxr.py index 71e1bbfd83..4040d83d4e 100644 --- a/lib/ansible/plugins/terminal/iosxr.py +++ b/lib/ansible/plugins/terminal/iosxr.py @@ -30,7 +30,8 @@ class TerminalModule(TerminalBase): terminal_prompts_re = [ re.compile(r"[\r\n]?[\w+\-\.:\/\[\]]+(?:\([^\)]+\)){,3}(?:>|#) ?$"), - re.compile(r"\[\w+\@[\w\-\.]+(?: [^\]])\] ?[>#\$] ?$") + re.compile(r"\[\w+\@[\w\-\.]+(?: [^\]])\] ?[>#\$] ?$"), + re.compile(r']]>]]>[\r\n]?') ] terminal_errors_re = [ @@ -51,11 +52,3 @@ class TerminalModule(TerminalBase): self._connection.exec_command(cmd) except AnsibleConnectionFailure: raise AnsibleConnectionFailure('unable to set terminal parameters') - - @staticmethod - def guess_network_os(conn): - stdin, stdout, stderr = conn.exec_command('show version') - if 'Cisco IOS XR' in stdout.read(): - return 'iosxr' - -