Commit 1917906d by Marcin Praczko

Fix detecting distribution release on OpenSuSE

Ansible raised exception during parsering /etc/SuSE-release file.
Regular expresion should use string instead of list.
Fix tested on OpenSuse 13.1
parent 617352a3
......@@ -328,7 +328,8 @@ class Facts(object):
break
elif path == '/etc/SuSE-release':
data = data.splitlines()
release = re.search('CODENAME *= *([^\n]+)\n', data)
for line in data:
release = re.search('CODENAME *= *([^\n]+)', line)
if release:
self.facts['distribution_release'] = release.groups()[0].strip()
break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment