add example of using slots to populate env vars from pillar

This commit is contained in:
merlinz01 2024-04-23 19:13:38 -04:00 committed by GitHub
parent 9063d0ca4b
commit 5a8c75574e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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