611d56dc4c
PluginLoader._get_paths, as of 391fb98e
, was only finding plug-ins that
were in a subdirectory of one of the basedirs (i.e. in a category
directory). For example, action_plugins/foo.py would never be loaded,
but action_plugins/bar/foo.py would work.
This makes it so that "uncategorized" plug-ins in the top level of a
directory such as action_plugins will be loaded, though plug-ins in a
"category" subdirectory will still be preferred. For example,
action_plugins/bar/foo.py would be preferred over action_plugins/foo.py.
15 lines
519 B
Python
15 lines
519 B
Python
from ansible.runner import return_data
|
|
|
|
|
|
class ActionModule (object):
|
|
def __init__(self, runner):
|
|
self.runner = runner
|
|
|
|
def run(self, conn, tmp, module_name, module_args, inject,
|
|
complex_args=None, **kwargs):
|
|
# This plug-in should be ignored in deference to
|
|
# category/categorized_plugin.py, so it should never actually
|
|
# run.
|
|
return return_data.ReturnData(
|
|
conn=conn, comm_ok=True,
|
|
result={"msg": "this plug-in should never be run"})
|