Skip to content

Instantly share code, notes, and snippets.

@bcoca
Created January 2, 2020 15:37
Show Gist options
  • Save bcoca/7090c500fbaa8d2cf817d3b3b10f1732 to your computer and use it in GitHub Desktop.
Save bcoca/7090c500fbaa8d2cf817d3b3b10f1732 to your computer and use it in GitHub Desktop.
diff --git a/lib/ansible/executor/module_common.py b/lib/ansible/executor/module_common.py
index 5451ce9586..f08f77a7b6 100644
--- a/lib/ansible/executor/module_common.py
+++ b/lib/ansible/executor/module_common.py
@@ -730,7 +730,8 @@ def recursive_finder(name, module_fqn, data, py_module_names, py_module_cache, z
module_info = CollectionModuleInfo(py_module_name[-idx],
[os.path.join(*py_module_name[:-idx])])
break
- except ImportError:
+ except ImportError as e:
+ display.debug('Failed to import: %s' % to_text(e))
continue
elif py_module_name[0:2] == ('ansible', 'module_utils'):
# Need to remove ansible.module_utils because PluginLoader may find different paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment