From 514b974182ff84a72c128d31710591930ee52ae0 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 26 Feb 2019 11:51:16 -0500 Subject: [PATCH] Loader invalid plugin nicer error (#52754) * stop processing invalid plugins --- changelogs/fragments/skip_invalid_plugin.yml | 2 ++ lib/ansible/plugins/loader.py | 1 + 2 files changed, 3 insertions(+) create mode 100644 changelogs/fragments/skip_invalid_plugin.yml diff --git a/changelogs/fragments/skip_invalid_plugin.yml b/changelogs/fragments/skip_invalid_plugin.yml new file mode 100644 index 00000000000..a850534f5c0 --- /dev/null +++ b/changelogs/fragments/skip_invalid_plugin.yml @@ -0,0 +1,2 @@ +bugfixes: + - skip invalid plugin after warning in loader diff --git a/lib/ansible/plugins/loader.py b/lib/ansible/plugins/loader.py index 23328a13f3f..29d41dbb865 100644 --- a/lib/ansible/plugins/loader.py +++ b/lib/ansible/plugins/loader.py @@ -540,6 +540,7 @@ class PluginLoader: self._load_config_defs(basename, module, path) except Exception as e: display.warning("Skipping plugin (%s) as it seems to be invalid: %s" % (path, to_text(e))) + continue self._module_cache[path] = module found_in_cache = False