I am new to Salt-Stack wanted to know where are all the dunder dictionaries stored(Ex:salt,opts,grains,beacons etc).

Thanks in Advance :)

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.