salt.runners.pillar

Functions to interact with the pillar compiler on the master

salt.runners.pillar.show_pillar(minion='*', **kwargs)

Returns the compiled pillar either of a specific minion or just the global available pillars. I assume that no minion is using the id *.

CLI Example:

shows minion specific pillar:

salt-run pillar.show_pillar 'www.example.com'

shows global pillar:

salt-run pillar.show_pillar

shows global pillar for 'dev' pillar environment:

salt-run pillar.show_pillar 'saltenv=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_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