From e5d247fdc0d7595b395eb1bc9629600d32ad5a8a Mon Sep 17 00:00:00 2001 From: Jonathan Karras Date: Mon, 11 Sep 2017 08:08:12 -0600 Subject: [PATCH] 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 --- lib/ansible/modules/network/ios/ios_facts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/network/ios/ios_facts.py b/lib/ansible/modules/network/ios/ios_facts.py index 99d8985fb1..37449a2788 100644 --- a/lib/ansible/modules/network/ios/ios_facts.py +++ b/lib/ansible/modules/network/ios/ios_facts.py @@ -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)