22.25.1.13. 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

Docs for previous releases are available on salt.rtfd.org.

Latest Salt release: 2014.1.13

Try the shiny new release candidate of Salt, v2014.7.0rc6! More info here.

Previous topic

22.25.1.12. salt.runners.network

Next topic

22.25.1.14. salt.runners.queue

SaltStack News

Upcoming SaltStack events, webinars and local meet ups and user groups.