From 1f539e6601ecc842bf65c1119b64a21d9cafeaea Mon Sep 17 00:00:00 2001 From: Berend de Boer Date: Tue, 16 Jan 2018 10:49:58 +1300 Subject: [PATCH] FreeBSD STABLE distribution not correctly parsed (#34770) --- lib/ansible/module_utils/facts/system/distribution.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/facts/system/distribution.py b/lib/ansible/module_utils/facts/system/distribution.py index ab896157d1..7e3cbcf6c1 100644 --- a/lib/ansible/module_utils/facts/system/distribution.py +++ b/lib/ansible/module_utils/facts/system/distribution.py @@ -496,7 +496,7 @@ class Distribution(object): def get_distribution_FreeBSD(self): freebsd_facts = {} freebsd_facts['distribution_release'] = platform.release() - data = re.search(r'(\d+)\.(\d+)-RELEASE.*', freebsd_facts['distribution_release']) + data = re.search(r'(\d+)\.(\d+)-(RELEASE|STABLE).*', freebsd_facts['distribution_release']) if data: freebsd_facts['distribution_major_version'] = data.group(1) freebsd_facts['distribution_version'] = '%s.%s' % (data.group(1), data.group(2))