mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Clarify docs on custom types
This commit is contained in:
parent
d3a5a1be74
commit
1b876fc53a
4 changed files with 29 additions and 10 deletions
|
@ -20,6 +20,12 @@ synced to the minions when :mod:`state.highstate
|
|||
:mod:`saltutil.sync_modules <salt.modules.saltutil.sync_modules>` or
|
||||
:mod:`saltutil.sync_all <salt.modules.saltutil.sync_all>` functions.
|
||||
|
||||
Any custom modules which have been synced to a minion, that are named the
|
||||
same as one of Salt's default set of modules, will take the place of the default
|
||||
module with the same name. Note that a module's default name is its filename
|
||||
(i.e. ``foo.py`` becomes module ``foo``), but that its name can be overridden
|
||||
by using a :ref:`__virtual__ function <virtual-modules>`.
|
||||
|
||||
Since Salt modules are just Python/Cython modules, there are no restraints on
|
||||
what you can put inside of a Salt module. If a Salt module has errors and
|
||||
cannot be imported, the Salt minion will continue to load without issue and the
|
||||
|
@ -133,6 +139,9 @@ Outputter.
|
|||
|
||||
This will ensure that the text outputter is used.
|
||||
|
||||
|
||||
.. _virtual-modules:
|
||||
|
||||
Virtual Modules
|
||||
===============
|
||||
|
||||
|
|
|
@ -104,12 +104,14 @@ function. The ``render`` function will be passed the path of the SLS file. In
|
|||
the ``render`` function, parse the passed file and return the data structure
|
||||
derived from the file. You can place your custom renderers in a ``_renderers``
|
||||
directory within the :conf_master:`file_roots` specified by the master config
|
||||
file. These custom renderers are distributed when `state.highstate`_ is run, or
|
||||
by executing the `saltutil.sync_renderers`_ or `saltutil.sync_all`_ functions.
|
||||
file. These custom renderers are distributed when :mod:`state.highstate
|
||||
<salt.modules.state.highstate>` is run, or by executing the
|
||||
:mod:`saltutil.sync_renderers <salt.modules.saltutil.sync_renderers>` or
|
||||
:mod:`saltutil.sync_all <salt.modules.saltutil.sync_all>` functions.
|
||||
|
||||
.. _`state.highstate`: https://salt.readthedocs.org/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.highstate
|
||||
.. _`saltutil.sync_renderers`: https://salt.readthedocs.org/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.sync_renderers
|
||||
.. _`saltutil.sync_all`: https://salt.readthedocs.org/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.sync_all
|
||||
Any custom renderers which have been synced to a minion, that are named the
|
||||
same as one of Salt's default set of renderers, will take the place of the
|
||||
default renderer with the same name.
|
||||
|
||||
|
||||
Examples
|
||||
|
|
|
@ -74,12 +74,14 @@ serializes the data as json and sets it in redis.
|
|||
|
||||
You can place your custom returners in a ``_returners`` directory within the
|
||||
:conf_master:`file_roots` specified by the master config file. These custom
|
||||
returners are distributed when `state.highstate`_ is run, or by executing the
|
||||
`saltutil.sync_returners`_ or `saltutil.sync_all`_ functions.
|
||||
returners are distributed when :mod:`state.highstate
|
||||
<salt.modules.state.highstate>` is run, or by executing the
|
||||
:mod:`saltutil.sync_returners <salt.modules.saltutil.sync_returners>` or
|
||||
:mod:`saltutil.sync_all <salt.modules.saltutil.sync_all>` functions.
|
||||
|
||||
.. _`state.highstate`: https://salt.readthedocs.org/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.highstate
|
||||
.. _`saltutil.sync_returners`: https://salt.readthedocs.org/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.sync_returners
|
||||
.. _`saltutil.sync_all`: https://salt.readthedocs.org/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.sync_all
|
||||
Any custom returners which have been synced to a minion, that are named the
|
||||
same as one of Salt's default set of returners, will take the place of the
|
||||
default returner with the same name.
|
||||
|
||||
|
||||
Examples
|
||||
|
|
|
@ -42,6 +42,12 @@ run, or by executing the :mod:`saltutil.sync_states
|
|||
<salt.modules.saltutil.sync_states>` or :mod:`saltutil.sync_all
|
||||
<salt.modules.saltutil.sync_all>` functions.
|
||||
|
||||
Any custom states which have been synced to a minion, that are named the
|
||||
same as one of Salt's default set of states, will take the place of the default
|
||||
state with the same name. Note that a state's default name is its filename
|
||||
(i.e. ``foo.py`` becomes state ``foo``), but that its name can be overridden
|
||||
by using a :ref:`__virtual__ function <virtual-modules>`.
|
||||
|
||||
|
||||
Cross Calling Modules
|
||||
=====================
|
||||
|
|
Loading…
Add table
Reference in a new issue