salt.modules.defaults

salt.modules.defaults.get(key, default='')

defaults.get is used much like pillar.get except that it will read a default value for a pillar from defaults.json or defaults.yaml files that are stored in the root of a salt formula.

CLI Example:

salt '*' defaults.get core:users:root

The defaults is computed from pillar key. The first entry is considered as the formula namespace.

For example, querying core:users:root will try to load salt://core/defaults.yaml and salt://core/defaults.json.