mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-18 06:11:07 -07:00
show version brief does not work on iosxr virtual (#37609)
* show version brief does not work on iosxr virtual * ci failures fix
This commit is contained in:
parent
73d3ed85ef
commit
66b389a00d
4 changed files with 24 additions and 5 deletions
|
@ -136,12 +136,12 @@ class FactsBase(object):
|
|||
class Default(FactsBase):
|
||||
|
||||
def commands(self):
|
||||
return(['show version brief'])
|
||||
return(['show version | utility head -n 20'])
|
||||
|
||||
def populate(self, results):
|
||||
self.facts['version'] = self.parse_version(results['show version brief'])
|
||||
self.facts['image'] = self.parse_image(results['show version brief'])
|
||||
self.facts['hostname'] = self.parse_hostname(results['show version brief'])
|
||||
self.facts['version'] = self.parse_version(results['show version | utility head -n 20'])
|
||||
self.facts['image'] = self.parse_image(results['show version | utility head -n 20'])
|
||||
self.facts['hostname'] = self.parse_hostname(results['show version | utility head -n 20'])
|
||||
|
||||
def parse_version(self, data):
|
||||
match = re.search(r'Version (\S+)$', data, re.M)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue