mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
add example of using slots to populate env vars from pillar
This commit is contained in:
parent
9063d0ca4b
commit
5a8c75574e
1 changed files with 8 additions and 0 deletions
|
@ -229,6 +229,14 @@ To use it, one may pass it like this. Example:
|
|||
cmd.run:
|
||||
- env: {{ salt['pillar.get']('example:key', {}) }}
|
||||
|
||||
Better yet, use the slots feature to insert the data at runtime and minimize pillar data exposure:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
printenv:
|
||||
cmd.run:
|
||||
- env: __slot__:salt:pillar.get(example:key)
|
||||
|
||||
"""
|
||||
|
||||
import copy
|
||||
|
|
Loading…
Add table
Reference in a new issue