Read pillar data from a Redis backend

New in version 2014.7.0.

  • redis Python module (on master)

Salt Master Redis Configuration

The module shares the same base Redis connection variables as salt.returners.redis_return. These variables go in your master config file.

  • redis.db - The Redis database to use. Defaults to 0.

  • - The Redis host to connect to. Defaults to 'salt'.

  • redis.port - The port that the Redis database is listening on. Defaults to 6379.

  • redis.password - The password for authenticating with Redis. Only required if you are using master auth. Defaults to None.

Configuring the Redis ext_pillar

  - redis: {function: key_value}
salt.pillar.redismod.ext_pillar(minion_id, pillar, function, **kwargs)

Grabs external pillar data based on configured function

salt.pillar.redismod.key_json(minion_id, pillar, pillar_key=None)

Pulls a string from redis and deserializes it from json. Deserialized dictionary data loaded directly into top level if pillar_key is not set.


Pillar key to return data into

salt.pillar.redismod.key_value(minion_id, pillar, pillar_key='redis_pillar')

Looks for key in redis matching minion_id, returns a structure based on the data type of the redis key. String for string type, dict for hash type and lists for lists, sets and sorted sets.


Pillar key to return data into