From 12d221152bf5d8a9727493697b81bf739f58cc7e Mon Sep 17 00:00:00 2001 From: epicanthal Date: Wed, 6 Jun 2018 05:47:18 -0700 Subject: [PATCH] Update ios_facts.py (#40928) Account for upper/lower case match occurrences of "[Nn]umber" and "[Ss]erial" Model Number : WS-C3850-12X48U System Serial Number : --- lib/ansible/modules/network/ios/ios_facts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/network/ios/ios_facts.py b/lib/ansible/modules/network/ios/ios_facts.py index 0793f1a9ce6..805c635a376 100644 --- a/lib/ansible/modules/network/ios/ios_facts.py +++ b/lib/ansible/modules/network/ios/ios_facts.py @@ -204,11 +204,11 @@ class Default(FactsBase): return match.group(1) def parse_stacks(self, data): - match = re.findall(r'^Model number\s+: (\S+)', data, re.M) + match = re.findall(r'^Model [Nn]umber\s+: (\S+)', data, re.M) if match: self.facts['stacked_models'] = match - match = re.findall(r'^System serial number\s+: (\S+)', data, re.M) + match = re.findall(r'^System [Ss]erial [Nn]umber\s+: (\S+)', data, re.M) if match: self.facts['stacked_serialnums'] = match