diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index 2116850e2bb..a31623ab51a 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -183,7 +183,8 @@ def get_distribution(): ''' return the distribution name ''' if platform.system() == 'Linux': 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'): distribution = platform.linux_distribution(supported_dists=['system'])[0].capitalize() if 'Amazon' in distribution: