I am new to Salt-Stack wanted to know where are all the dunder dictionaries stored?
For example __salt__
, __opts__
, __grains__
, __beacons__
).
There are currently 5 dunder dictionaries. They are available at runtime and generally not stored statically.
__opts__
- Master or Minion configuration options; stored in configuration files of master and minion, collected at startup
__salt__
- Execution module functions (i.e. __salt__['test.echo']('foo')
); from built-in and custom execution modules stored in _modules/
__grains__
- Grains (i.e. __grains__['os']
); collected from minions, dynamically generated, or stored in minion config or /etc/salt/grains
__pillar__
- Pillar data (i.e. __pillar__['foo']
); collected from the pillar
__context__
- Context defined in state modules and execution modules
You generally don't need to use them, unless you are developing Salt or writing custom modules, runners, returners, or external pillars.