--- title: redis type: docs --- [![Source Code](https://img.shields.io/badge/gitea-source%20code-blue?logo=gitea&logoColor=white)](https://gitea.rknet.org/ansible/xoxys.redis) [![Build Status](https://img.shields.io/drone/build/ansible/xoxys.redis?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/ansible/xoxys.redis) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?label=license)](https://gitea.rknet.org/ansible/xoxys.redis/src/branch/master/LICENSE) Setup Redis server. * [Default Variables](#default-variables) * [redis_appendfsync](#redis_appendfsync) * [redis_appendonly](#redis_appendonly) * [redis_bind_interface](#redis_bind_interface) * [redis_conf_path](#redis_conf_path) * [redis_daemon](#redis_daemon) * [redis_daemonize](#redis_daemonize) * [redis_databases](#redis_databases) * [redis_dbdir](#redis_dbdir) * [redis_dbfilename](#redis_dbfilename) * [redis_disabled_commands](#redis_disabled_commands) * [redis_includes](#redis_includes) * [redis_logfile](#redis_logfile) * [redis_loglevel](#redis_loglevel) * [redis_maxmemory](#redis_maxmemory) * [redis_maxmemory_policy](#redis_maxmemory_policy) * [redis_maxmemory_samples](#redis_maxmemory_samples) * [redis_packages](#redis_packages) * [redis_packages_extra](#redis_packages_extra) * [redis_pidfile](#redis_pidfile) * [redis_port](#redis_port) * [redis_rdbcompression](#redis_rdbcompression) * [redis_requirepass](#redis_requirepass) * [redis_save](#redis_save) * [redis_supervised](#redis_supervised) * [redis_timeout](#redis_timeout) * [redis_unixsocket](#redis_unixsocket) * [Dependencies](#dependencies) --- ## Default Variables ### redis_appendfsync #### Default value ```YAML redis_appendfsync: everysec ``` ### redis_appendonly #### Default value ```YAML redis_appendonly: no ``` ### redis_bind_interface #### Default value ```YAML redis_bind_interface: 127.0.0.1 ``` ### redis_conf_path #### Default value ```YAML redis_conf_path: /etc/redis.conf ``` ### redis_daemon #### Default value ```YAML redis_daemon: redis ``` ### redis_daemonize #### Default value ```YAML redis_daemonize: no ``` ### redis_databases #### Default value ```YAML redis_databases: 16 ``` ### redis_dbdir Can be used to change the redis dbdir path #### Default value ```YAML redis_dbdir: /var/lib/redis ``` ### redis_dbfilename #### Default value ```YAML redis_dbfilename: dump.rdb ``` ### redis_disabled_commands Disable certain Redis commands for security reasons. #### Default value ```YAML redis_disabled_commands: [] ``` #### Example usage ```YAML redis_disabled_commands: - FLUSHDB - FLUSHALL - KEYS - PEXPIRE - DEL - CONFIG - SHUTDOWN - BGREWRITEAOF - BGSAVE - SAVE - SPOP - SREM - RENAME - DEBUG ``` ### redis_includes Add extra include files for local configuration/overrides. #### Default value ```YAML redis_includes: [] ``` ### redis_logfile Can be used to change the redis log file path #### Default value ```YAML redis_logfile: /var/log/redis/redis.log ``` ### redis_loglevel #### Default value ```YAML redis_loglevel: notice ``` ### redis_maxmemory #### Default value ```YAML redis_maxmemory: 0 ``` ### redis_maxmemory_policy #### Default value ```YAML redis_maxmemory_policy: noeviction ``` ### redis_maxmemory_samples #### Default value ```YAML redis_maxmemory_samples: 5 ``` ### redis_packages Define a list of packages to install. The default packages depend on the OS version. ### redis_packages_extra Can be used to install other dependency packages. #### Default value ```YAML redis_packages_extra: [] ``` ### redis_pidfile #### Default value ```YAML redis_pidfile: /var/run/redis_{{ redis_port }}.pid ``` ### redis_port #### Default value ```YAML redis_port: 6379 ``` ### redis_rdbcompression #### Default value ```YAML redis_rdbcompression: yes ``` ### redis_requirepass Require authentication to Redis with a password. #### Default value ```YAML redis_requirepass: _unset_ ``` ### redis_save Set to an empty set to disable persistence (saving the DB to disk). #### Default value ```YAML redis_save: - 900 1 - 300 10 - 60 10000 ``` ### redis_supervised #### Default value ```YAML redis_supervised: no ``` ### redis_timeout #### Default value ```YAML redis_timeout: 300 ``` ### redis_unixsocket #### Default value ```YAML redis_unixsocket: _unset_ ``` ## Dependencies None.