From dbc5cc9d7a5d1f634c95f46c78895a5cac34717a Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Fri, 1 Apr 2016 20:25:56 -0400 Subject: [PATCH] fix issue with plugin load path inconsistency now assures it is always a list of paths and not just assumes it this avoids issues of parsing a 'string path' and picking up '/' as a valid path for plugin loader --- lib/ansible/plugins/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ansible/plugins/__init__.py b/lib/ansible/plugins/__init__.py index f4e288c8ca2..f16bb0e6e56 100644 --- a/lib/ansible/plugins/__init__.py +++ b/lib/ansible/plugins/__init__.py @@ -61,10 +61,14 @@ class PluginLoader: self.class_name = class_name self.base_class = required_base_class self.package = package - self.config = config self.subdir = subdir self.aliases = aliases + if not isinstance(config, list): + config = [config] + + self.config = config + if not class_name in MODULE_CACHE: MODULE_CACHE[class_name] = {} if not class_name in PATH_CACHE: