mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00: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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user