salt.states.redismod

Management of Redis server

New in version 2014.7.0.

depends:
  • redis Python module
configuration:

See salt.modules.redis for setup instructions.

key_in_redis:
  redis.string:
    - value: string data

The redis server information specified in the minion config file can be overridden in states using the following arguments: host, post, db, password.

key_in_redis:
  redis.string:
    - value: string data
    - host: localhost
    - port: 6379
    - db: 0
    - password: somuchkittycat
salt.states.redismod.absent(name, keys=None, **connection_args)

Ensure key absent from redis

name
Key to ensure absent from redis
keys
list of keys to ensure absent, name will be ignored if this is used
salt.states.redismod.string(name, value, expire=None, expireat=None, **connection_args)

Ensure that the key exists in redis with the value specified

name
Redis key to manage
value
Data to persist in key
expire
Sets time to live for key in seconds
expireat
Sets expiration time for key via UNIX timestamp, overrides expire