Merge pull request #8679 from j0057/support-arch-8653

Add support for Arch to module_utils.basic.py
pull/10402/merge
Toshio Kuratomi 10 years ago
commit bb81f025b0

@ -183,7 +183,8 @@ def get_distribution():
''' return the distribution name ''' ''' return the distribution name '''
if platform.system() == 'Linux': if platform.system() == 'Linux':
try: try:
distribution = platform.linux_distribution()[0].capitalize() supported_dists = platform._supported_dists + ('arch',)
distribution = platform.linux_distribution(supported_dists=supported_dists)[0].capitalize()
if not distribution and os.path.isfile('/etc/system-release'): if not distribution and os.path.isfile('/etc/system-release'):
distribution = platform.linux_distribution(supported_dists=['system'])[0].capitalize() distribution = platform.linux_distribution(supported_dists=['system'])[0].capitalize()
if 'Amazon' in distribution: if 'Amazon' in distribution:

Loading…
Cancel
Save