diff --git a/lib/ansible/plugins/__init__.py b/lib/ansible/plugins/__init__.py index f4e288c8ca..f16bb0e6e5 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: