Role Detail

geerlingguy.redis

Redis for Linux
Downloads
106015
Type Ansible
Minimum Ansible Version 2.0
Installation $ ansible-galaxy install geerlingguy.redis
Tags
database
development
web
Last Commit 2017-06-13 21:26:09 PM UTC
Last Imported 2017-11-14 18:25:06 PM UTC
Version History
Version Release Date
1.5.1 2017-06-13 21:26:09 PM
1.5.0 2017-06-02 14:39:02 PM
1.4.2 2017-01-24 22:14:10 PM
1.4.1 2016-09-20 15:15:03 PM
1.4.0 2016-09-18 02:20:02 AM
1.3.0 2016-09-16 02:13:02 AM
1.2.0 2016-03-07 01:36:01 AM
1.1.5 2015-09-11 16:49:04 PM
1.1.4 2015-08-31 18:15:06 PM
1.1.3 2015-03-04 16:28:04 PM
1.1.2 2015-03-04 15:37:03 PM
1.1.1 2015-02-18 05:48:05 AM
1.1.0 2015-02-18 05:33:05 AM
1.0.1 2014-11-11 16:43:04 PM
1.0.0 2014-03-12 18:48:06 PM
Supported Platforms
Platform Version
Debian etch
Debian jessie
Debian lenny
Debian sid
Debian squeeze
Debian stretch
Debian wheezy
EL 6
EL 7
Fedora 16
Fedora 17
Fedora 18
Fedora 19
Fedora 20
Fedora 21
Fedora 22
Fedora 23
Fedora 24
Fedora 25
Fedora 26
Ubuntu artful
Ubuntu lucid
Ubuntu maverick
Ubuntu natty
Ubuntu oneiric
Ubuntu precise
Ubuntu quantal
Ubuntu raring
Ubuntu saucy
Ubuntu trusty
Ubuntu utopic
Ubuntu vivid
Ubuntu wily
Ubuntu xenial
Ubuntu yakkety
Ubuntu zesty
Last 10 Imports
Completed Status
2017-11-14 18:25:06 PM UTC SUCCESS
2017-11-10 20:07:08 PM UTC SUCCESS
2017-11-10 15:56:03 PM UTC SUCCESS
2017-11-10 11:42:11 AM UTC SUCCESS
2017-11-10 11:40:11 AM UTC SUCCESS
2017-11-10 11:20:11 AM UTC SUCCESS
2017-11-10 06:08:06 AM UTC SUCCESS
2017-11-10 06:01:06 AM UTC SUCCESS
2017-11-10 05:16:05 AM UTC SUCCESS
2017-11-10 05:09:05 AM UTC SUCCESS

Ansible Role: Redis

Build Status

Installs Redis on RHEL/CentOS or Debian/Ubuntu.

Requirements

On RedHat-based distributions, requires the EPEL repository (you can simply add the role geerlingguy.repo-epel to install ensure EPEL is available).

Role Variables

redis_enablerepo: epel

(Used only on RHEL/CentOS) The repository to use for Redis installation.

Available variables are listed below, along with default values (see defaults/main.yml):

redis_port: 6379
redis_bind_interface: 127.0.0.1

Port and interface on which Redis will listen. Set the interface to 0.0.0.0 to listen on all interfaces.

redis_unixsocket: ''

If set, Redis will also listen on a local Unix socket.

redis_timeout: 300

Close a connection after a client is idle N seconds. Set to 0 to disable timeout.

redis_loglevel: "notice"
redis_logfile: /var/log/redis/redis-server.log

Log level and log location (valid levels are debug, verbose, notice, and warning).

redis_databases: 16

The number of Redis databases.

# Set to an empty set to disable persistence (saving the DB to disk).
redis_save:
  - 900 1
  - 300 10
  - 60 10000

Snapshotting configuration; setting values in this list will save the database to disk if the given number of seconds (e.g. 900) and the given number of write operations (e.g. 1) have occurred.

redis_rdbcompression: "yes"
redis_dbfilename: dump.rdb
redis_dbdir: /var/lib/redis

Database compression and location configuration.

redis_maxmemory: 0

Limit memory usage to the specified amount of bytes. Leave at 0 for unlimited.

redis_maxmemory_policy: "noeviction"

The method to use to keep memory usage below the limit, if specified. See Using Redis as an LRU cache.

redis_maxmemory_samples: 5

Number of samples to use to approximate LRU. See Using Redis as an LRU cache.

redis_appendonly: "no"

The appendonly option, if enabled, affords better data durability guarantees, at the cost of slightly slower performance.

redis_appendfsync: "everysec"

Valid values are always (slower, safest), everysec (happy medium), or no (let the filesystem flush data when it wants, most risky).

# Add extra include files for local configuration/overrides.
redis_includes: []

Add extra include file paths to this list to include more/localized Redis configuration.

The redis package name for installation via the system package manager. Defaults to redis-server on Debian and redis on RHEL.

redis_package_name: "redis-server"

(Default for RHEL shown) The redis package name for installation via the system package manager. Defaults to redis-server on Debian and redis on RHEL.

redis_requirepass: ""

Set a password to require authentication to Redis. You can generate a strong password using echo "my_password_here" | sha256sum.

redis_disabled_commands: []

For extra security, you can disable certain Redis commands (this is especially important if Redis is publicly accessible). For example:

redis_disabled_commands:
  - FLUSHDB
  - FLUSHALL
  - KEYS
  - PEXPIRE
  - DEL
  - CONFIG
  - SHUTDOWN

Dependencies

None.

Example Playbook

- hosts: all
  roles:
    - { role: geerlingguy.redis }

License

MIT / BSD

Author Information

This role was created in 2014 by Jeff Geerling, author of Ansible for DevOps.

None