From e79c9202602f123375dbbdeaef205ec10b74f597 Mon Sep 17 00:00:00 2001 From: Joost Molenaar Date: Tue, 19 Aug 2014 12:04:27 +0200 Subject: [PATCH] Add support for Arch to module_utils.basic.py Fixes ansible/ansible#8653 --- lib/ansible/module_utils/basic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index aaaf85e5e05..eeb64d97248 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -181,7 +181,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: