Skip to content

adriano-di-giovanni/ansible-role-redis

Repository files navigation

Ansible Role: Redis

Ansible role for Redis:

  • performs an opinionated installation from source code
  • tunes OS performance
  • configures Redis using include files instead of modifying the redis.conf shipped into the distribution

It's meant to be run on Ubuntu 64-bit, Trusty and Xenial, machines.

IMPORTANT RDB and AOF are disabled by default. Override configuration directives using redis_includes variable in your tasks.

IMPORTANT Don't rename/disable SHUTDOWN command. It's used by the init script.

Requirements

None.

Role variables

variable required default choices comment
redis_version no 4.0.2   Version of Redis to install
redis_download_checksum no sha256:b1a0915dbc91b979d06df1977fe594c3fa9b189f1f3d38743a2948c9f7634813   Download file checksum. See https://github.com/antirez/redis-hashes
redis_port no 6379   Redis will accept connections on the specified port
redis_bind no 127.0.0.1   Redis will listen for connections from selected interfaces.
redis_requirepass no      
redis_maxmemory_percentage no   no Redis will use at most this percentage of system memory
redis_includes no [] no Include one or more config files here

Dependencies

None.

Example playbook

- hosts: all
  become: true
  roles:
    - adriano-di-giovanni.redis

The `example-*/`` folders contain project files to provision VMs using Vagrant and VirtualBox.

License

MIT

Author information

Adriano Di Giovanni