diff --git a/lib/ansible/utils/plugins.py b/lib/ansible/utils/plugins.py index 72c0eac9c6..1aeba16693 100644 --- a/lib/ansible/utils/plugins.py +++ b/lib/ansible/utils/plugins.py @@ -151,7 +151,7 @@ class PluginLoader(object): for i in self._get_paths(): path = os.path.join(i, "%s%s" % (name, suffix)) - if os.path.exists(path): + if os.path.isfile(path): self._plugin_path_cache[name] = path return path