redis

Collection: community.general

Full Name: parallax.community.general.redis

Aliases: community.general.redis, redis

Synopsis

Run Redis administrative commands such as replication and flush

Parameters

NameTypeRequiredDefaultDescription
commandstringyesRedis command to execute (e.g. config, slave, flush)
login_hoststringlocalhostHost running the Redis server
login_portint6379Port of the Redis server
login_passwordstringPassword for Redis authentication
namestringName of the Redis config parameter or key
valuestringValue to set for the config parameter or key
master_hoststringHost of the Redis master for replication
master_portintPort of the Redis master for replication
master_authstringAuthentication password for the master
dbint0Redis database number
flush_modestringallFlush mode Choices: all, db

Example

- name: Promote this node out of replication
  redis:
    command: replica
    login_host: 127.0.0.1
    master_host: ""
    master_port: 0