mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 14:41:23 -07:00
* 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:
parent
f0aa31b49e
commit
e5d247fdc0
1 changed files with 1 additions and 1 deletions
|
@ -184,7 +184,7 @@ class Default(FactsBase):
|
||||||
self.facts['hostname'] = self.parse_hostname(data)
|
self.facts['hostname'] = self.parse_hostname(data)
|
||||||
|
|
||||||
def parse_version(self, data):
|
def parse_version(self, data):
|
||||||
match = re.search(r'Version (\S+),', data)
|
match = re.search(r'Version (\S+?)(?:,\s|\s)', data)
|
||||||
if match:
|
if match:
|
||||||
return match.group(1)
|
return match.group(1)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue