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

Fix SteamOS ansible_distribution fact (Fixes #33628) (#37576)

Fixes #33628
This commit is contained in:
Alexander Bethke 2018-03-21 16:50:54 +01:00 committed by Adrian Likins
parent ca634486f1
commit eebe728ae8
2 changed files with 32 additions and 1 deletions

View file

@ -311,6 +311,9 @@ class DistributionFiles:
elif 'Ubuntu' in data:
debian_facts['distribution'] = 'Ubuntu'
# nothing else to do, Ubuntu gets correct info from python functions
elif 'SteamOS' in data:
debian_facts['distribution'] = 'SteamOS'
# nothing else to do, SteamOS gets correct info from python functions
else:
return False, debian_facts
@ -410,7 +413,7 @@ class Distribution(object):
'Ascendos', 'CloudLinux', 'PSBM', 'OracleLinux', 'OVS',
'OEL', 'Amazon', 'Virtuozzo', 'XenServer'],
'Debian': ['Debian', 'Ubuntu', 'Raspbian', 'Neon', 'KDE neon',
'Linux Mint'],
'Linux Mint', 'SteamOS'],
'Suse': ['SuSE', 'SLES', 'SLED', 'openSUSE', 'openSUSE Tumbleweed',
'SLES_SAP', 'SUSE_LINUX', 'openSUSE Leap'],
'Archlinux': ['Archlinux', 'Antergos', 'Manjaro'],

View file

@ -377,6 +377,34 @@ BUG_REPORT_URL="http://bugs.debian.org/"
'distribution_version': u'7.9'
}
},
{
'name': "SteamOS 2.0",
'input': {
'/etc/os-release': """PRETTY_NAME="SteamOS GNU/Linux 2.0 (brewmaster)"
NAME="SteamOS GNU/Linux"
VERSION_ID="2"
VERSION="2 (brewmaster)"
ID=steamos
ID_LIKE=debian
HOME_URL="http://www.steampowered.com/"
SUPPORT_URL="http://support.steampowered.com/"
BUG_REPORT_URL="http://support.steampowered.com/"
""",
'/etc/lsb-release': """DISTRIB_ID=SteamOS
DISTRIB_RELEASE=2.0
DISTRIB_CODENAME=brewmaster
DISTRIB_DESCRIPTION="SteamOS 2.0"
"""
},
'platform.dist': ('Steamos', '2.0', 'brewmaster'),
'result': {
'distribution': u'SteamOS',
'distribution_major_version': u'2',
'distribution_release': u'brewmaster',
"os_family": "Debian",
'distribution_version': u'2.0'
}
},
{
"platform.dist": [
"Ubuntu",