mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add information to consider before adding a Grain to doco's for Grains
This commit is contained in:
parent
c30656814d
commit
a0e1fcc951
1 changed files with 9 additions and 0 deletions
|
@ -132,6 +132,15 @@ Using Jinja templating, only one match entry needs to be defined.
|
|||
Writing Grains
|
||||
==============
|
||||
|
||||
Consider adding Gains when the information is needed for targeting,
|
||||
the grains should only contain the **bare minimum data** required. Also think
|
||||
about other platforms/operating systems, and if the grain key name and data
|
||||
structure can be named and design to support many platforms, operating systems
|
||||
or applications. Most of the time execution module called from a JINJA template
|
||||
will provide the necessary detail information for a Salt State. Consider if your
|
||||
idea for a Grain would should be developed as a execution module rather than a
|
||||
Gain or a combination of both keeping minimum grain data.
|
||||
|
||||
The grains interface is derived by executing
|
||||
all of the "public" functions found in the modules located in the grains
|
||||
package or the custom grains directory. The functions in the modules of
|
||||
|
|
Loading…
Add table
Reference in a new issue