diff --git a/changelog/52521.fixed.md b/changelog/52521.fixed.md new file mode 100644 index 000000000000..bfbfdcddd469 --- /dev/null +++ b/changelog/52521.fixed.md @@ -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. diff --git a/doc/ref/modules/index.rst b/doc/ref/modules/index.rst index ec3cc8f2361a..a7a3ca44b0bb 100644 --- a/doc/ref/modules/index.rst +++ b/doc/ref/modules/index.rst @@ -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: