mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #10418 from pyroscope/fix-raspbian-distribution_release
Handle /etc/os-release files with 'Raspbian' in them
This commit is contained in:
commit
5c9f867c6c
1 changed files with 2 additions and 3 deletions
|
@ -232,7 +232,7 @@ class Facts(object):
|
||||||
RedHat = 'RedHat', Fedora = 'RedHat', CentOS = 'RedHat', Scientific = 'RedHat',
|
RedHat = 'RedHat', Fedora = 'RedHat', CentOS = 'RedHat', Scientific = 'RedHat',
|
||||||
SLC = 'RedHat', Ascendos = 'RedHat', CloudLinux = 'RedHat', PSBM = 'RedHat',
|
SLC = 'RedHat', Ascendos = 'RedHat', CloudLinux = 'RedHat', PSBM = 'RedHat',
|
||||||
OracleLinux = 'RedHat', OVS = 'RedHat', OEL = 'RedHat', Amazon = 'RedHat',
|
OracleLinux = 'RedHat', OVS = 'RedHat', OEL = 'RedHat', Amazon = 'RedHat',
|
||||||
XenServer = 'RedHat', Ubuntu = 'Debian', Debian = 'Debian', SLES = 'Suse',
|
XenServer = 'RedHat', Ubuntu = 'Debian', Debian = 'Debian', Raspbian = 'Debian', SLES = 'Suse',
|
||||||
SLED = 'Suse', openSUSE = 'Suse', SuSE = 'Suse', Gentoo = 'Gentoo', Funtoo = 'Gentoo',
|
SLED = 'Suse', openSUSE = 'Suse', SuSE = 'Suse', Gentoo = 'Gentoo', Funtoo = 'Gentoo',
|
||||||
Archlinux = 'Archlinux', Mandriva = 'Mandrake', Mandrake = 'Mandrake',
|
Archlinux = 'Archlinux', Mandriva = 'Mandrake', Mandrake = 'Mandrake',
|
||||||
Solaris = 'Solaris', Nexenta = 'Solaris', OmniOS = 'Solaris', OpenIndiana = 'Solaris',
|
Solaris = 'Solaris', Nexenta = 'Solaris', OmniOS = 'Solaris', OpenIndiana = 'Solaris',
|
||||||
|
@ -399,7 +399,7 @@ class Facts(object):
|
||||||
self.facts['distribution_version'] = self.facts['distribution_version'] + '.' + release.group(1)
|
self.facts['distribution_version'] = self.facts['distribution_version'] + '.' + release.group(1)
|
||||||
elif name == 'Debian':
|
elif name == 'Debian':
|
||||||
data = get_file_content(path)
|
data = get_file_content(path)
|
||||||
if 'Debian' in data:
|
if 'Debian' in data or 'Raspbian' in data:
|
||||||
release = re.search("PRETTY_NAME=[^(]+ \(?([^)]+?)\)", data)
|
release = re.search("PRETTY_NAME=[^(]+ \(?([^)]+?)\)", data)
|
||||||
if release:
|
if release:
|
||||||
self.facts['distribution_release'] = release.groups()[0]
|
self.facts['distribution_release'] = release.groups()[0]
|
||||||
|
@ -2674,4 +2674,3 @@ def get_all_facts(module):
|
||||||
setup_result['verbose_override'] = True
|
setup_result['verbose_override'] = True
|
||||||
|
|
||||||
return setup_result
|
return setup_result
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue