Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/52521.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Corrected the execution module documentation to clarify that a custom module overrides a stock module only when its filename matches the stock module filename; a custom module with a different filename only adds new functions under the shared virtual name.
9 changes: 7 additions & 2 deletions doc/ref/modules/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,13 @@ be unreliable as not all modules will be available at this point in time. The
are available however.

.. note::
Modules which return a string from ``__virtual__`` that is already used by
a module that ships with Salt will _override_ the stock module.
A custom module fully overrides a stock module only when the custom
module's *filename* matches the stock module's filename (for example, a
custom ``_modules/test.py`` overrides the stock ``test`` module). A custom
module with a different filename that returns an already-used virtual name
from ``__virtual__`` does not replace the stock module; instead, it only
adds functions that do not already exist under that virtual name, leaving
the stock functions in place.

.. _modules-error-info:

Expand Down
Loading