mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Add information to consider before adding a Grain to doco's for Grains
This commit is contained in:
parent
c30656814d
commit
a0e1fcc951
@ -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…
Reference in New Issue
Block a user