Working with dunders

For those of you not in the know, dunder refers to a variable that is preceded and succeeded by two underscores. For instance, one of the most common dunders in Salt is __opts__, which contains the configuration for either the Master or the Minion, depending on the context. There are a number of dunders that work together to form the glue that ties all of Salt together. Let's take a look at them in turn:

  • __opts__: On a Master, the __opts__ dictionary contains a composite of the information located in the Master's configuration files (normally /etc/salt/master plus files located in the /etc/salt/master.d/ directory), along with the default values for configuration parameters not specified, plus any internal configuration that ...

Get Extending SaltStack now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.