mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
Permit to have a action plugin without a empty module file
Currently, someone writing a action plugin will also need to have a empty file in the module path to avoid triggering the error "no action detected in task.".
This commit is contained in:
parent
0d290bddda
commit
4811c7f117
2 changed files with 6 additions and 2 deletions
|
@ -124,6 +124,8 @@ class DocCLI(CLI):
|
|||
try:
|
||||
# if the plugin lives in a non-python file (eg, win_X.ps1), require the corresponding python file for docs
|
||||
filename = loader.find_plugin(plugin, mod_type='.py', ignore_deprecated=True)
|
||||
if filename is None and loader == module_loader:
|
||||
filename = action_loader.find_plugin(module, mod_type='.py')
|
||||
if filename is None:
|
||||
display.warning("%s %s not found in %s\n" % (plugin_type, plugin, DocCLI.print_paths(loader)))
|
||||
continue
|
||||
|
@ -217,6 +219,8 @@ class DocCLI(CLI):
|
|||
# if the module lives in a non-python file (eg, win_X.ps1), require the corresponding python file for docs
|
||||
filename = loader.find_plugin(plugin, mod_type='.py', ignore_deprecated=True)
|
||||
|
||||
if filename is None and loader == module_loader:
|
||||
filename = action_loader.find_plugin(module, mod_type='.py')
|
||||
if filename is None:
|
||||
continue
|
||||
if filename.endswith(".ps1"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue