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
-
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.absent(name, keys=None, **connection_args)
-
Set this redis instance as a slave.
New in version 2016.3.0.
- name
-
Master to make this a slave of
- sentinel_host
-
Ip of the sentinel to check for the master
- sentinel_port
-
Port of the sentinel to check for the master
salt.states.redismod.slaveof(name, sentinel_host=None, sentinel_port=None, sentinel_password=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
salt.states.redismod.string(name, value, expire=None, expireat=None, **connection_args)
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/states/all/salt.states.redismod.html