salt.modules.pillar

Extract the pillar data for this minion

salt.modules.pillar.ext(external)

Generate the pillar and apply an explicit external pillar

CLI Example:

salt '*' pillar.ext 'libvirt: _'
salt.modules.pillar.get(key, default='')

New in version 0.14.

Attempt to retrieve the named value from pillar, if the named value is not available return the passed default. The default return is an empty string.

The value can also represent a value in a nested dict using a ":" delimiter for the dict. This means that if a dict in pillar looks like this:

{'pkg': {'apache': 'httpd'}}

To retrieve the value associated with the apache key in the pkg dict this key can be passed:

pkg:apache

CLI Example:

salt '*' pillar.get pkg:apache
salt.modules.pillar.item(*args)

New in version 0.16.2.

Return one ore more pillar entries

CLI Examples:

salt '*' pillar.item foo
salt '*' pillar.item foo bar baz
salt.modules.pillar.items(*args)

This function calls the master for a fresh pillar and generates the pillar data on the fly, unlike pillar.raw which returns the pillar data which is currently loaded into the minion.

CLI Example:

salt '*' pillar.items
salt.modules.pillar.raw(key=None)

Return the raw pillar data that is available in the module. This will show the pillar as it is loaded as the __pillar__ dict.

CLI Example:

salt '*' pillar.raw

With the optional key argument, you can select a subtree of the pillar raw data.:

salt '*' pillar.raw key='roles'