1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fixes #20443 - Adjust version checking regex to account fo no comma in IOS-XE (#29157)

* Adjust version checking regex to account fo no comma in IOS-XE
* Adjusted regex to include last character of version number
This commit is contained in:
Jonathan Karras 2017-09-11 08:08:12 -06:00 committed by Toshio Kuratomi
parent f0aa31b49e
commit e5d247fdc0

View file

@ -184,7 +184,7 @@ class Default(FactsBase):
self.facts['hostname'] = self.parse_hostname(data)
def parse_version(self, data):
match = re.search(r'Version (\S+),', data)
match = re.search(r'Version (\S+?)(?:,\s|\s)', data)
if match:
return match.group(1)