Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ios cliconf plugin fix regex for version #40066

Merged
merged 1 commit into from May 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/ansible/plugins/cliconf/ios.py
Expand Up @@ -38,9 +38,9 @@ def get_device_info(self):
reply = self.get('show version')
data = to_text(reply, errors='surrogate_or_strict').strip()

match = re.search(r'Version (\S+),', data)
match = re.search(r'Version (\S+)', data)
if match:
device_info['network_os_version'] = match.group(1)
device_info['network_os_version'] = match.group(1).strip(',')

match = re.search(r'^Cisco (.+) \(revision', data, re.M)
if match:
Expand Down