diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index e1eefb9c60..8edb73a14c 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -113,6 +113,12 @@ else: def iteritems(d): return d.iteritems() +try: + reduce +except NameError: + # Python 3 + from six.moves import reduce + try: NUMBERTYPES = (int, long, float) except NameError: