salt.runners.pillar#
Functions to interact with the pillar compiler on the master
- salt.runners.pillar.clear_pillar_cache(minion='*', **kwargs)#
Clears the cached values when using pillar_cache. Returns True on success. Returns False if pillar_cache or minion_data_cache are not enabled.
New in version 3003.
CLI Example:
Clears the pillar cache for a specific minion:
salt-run pillar.clear_pillar_cache 'minion'
- salt.runners.pillar.show_pillar(minion='*', **kwargs)#
Returns the compiled pillar either of a specific minion or just the global available pillars. This function assumes that no minion has the id
*. Function also accepts pillarenv as attribute in order to limit to a specific pillar branch of gitCLI Example:
shows minion specific pillar:
salt-run pillar.show_pillar 'www.example.com'
shows global pillar:
salt-run pillar.show_pillarshows global pillar for 'dev' pillar environment: (note that not specifying pillarenv will merge all pillar environments using the master config option pillar_source_merging_strategy.)
salt-run pillar.show_pillar 'pillarenv=dev'
shows global pillar for 'dev' pillar environment and specific pillarenv = dev:
salt-run pillar.show_pillar 'saltenv=dev' 'pillarenv=dev'
API Example:
import salt.config import salt.runner opts = salt.config.master_config('/etc/salt/master') runner = salt.runner.RunnerClient(opts) pillar = runner.cmd('pillar.show_pillar', []) print(pillar)
- salt.runners.pillar.show_pillar_cache(minion='*', **kwargs)#
Shows the cached values in pillar_cache
New in version 3003.
CLI Example:
Shows the pillar cache for a specific minion:
salt-run pillar.show_pillar_cache 'minion'
- salt.runners.pillar.show_top(minion=None, saltenv='base')#
Returns the compiled top data for pillar for a specific minion. If no minion is specified, we use the first minion we find.
CLI Example:
salt-run pillar.show_top