1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #9331 from marcinpraczko/devel

Fix detecting distribution release on OpenSuSE
This commit is contained in:
Michael DeHaan 2014-10-13 16:33:22 -07:00
commit bdf3ec1e21

View file

@ -328,10 +328,11 @@ class Facts(object):
break
elif path == '/etc/SuSE-release':
data = data.splitlines()
release = re.search('CODENAME *= *([^\n]+)\n', data)
if release:
self.facts['distribution_release'] = release.groups()[0].strip()
break
for line in data:
release = re.search('CODENAME *= *([^\n]+)', line)
if release:
self.facts['distribution_release'] = release.groups()[0].strip()
break
elif name == 'Debian':
data = get_file_content(path)
if 'Debian' in data: