redis

Read pillar data from a Redis backend

Added in version 2014.7.0.

depends:
  • 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.

  • redis.host - 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

ext_pillar:
  - redis: {function: key_value}
saltext.redis.pillar.redismod.__virtual__()[source]

Only load if the redis module is in __salt__

saltext.redis.pillar.redismod.ext_pillar(minion_id, pillar, function, **kwargs)[source]

Grabs external pillar data based on configured function

saltext.redis.pillar.redismod.key_value(minion_id, pillar, pillar_key='redis_pillar')[source]

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

Pillar key to return data into

saltext.redis.pillar.redismod.key_json(minion_id, pillar, pillar_key=None)[source]

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

Pillar key to return data into