aboutsummaryrefslogtreecommitdiffstats
path: root/roles/redis/README.md
blob: 8017bb2ed3d658d17f0735730f727c158f66d6e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Redis
=====

Description
-----------

The `redis` role configures a local Redis instance on the specified port.
The database will be stored in `/var/lib/redis/$PORT`, so it's possible to run
multiple redis instances on the same host.


Variables
---------

This role **accepts** the following variables:

Variable                  | Default       | Description
--------------------------|---------------|------------
`redis_port`              | 6379          | Local listening port
`redis_max_memory`        | `2gb`         | Memory usage limit before eviction
`redis_max_memory_policy` | `allkeys-lru` | Eviction policy

This role **exports** the following variables:

Variable     | Description
-------------|------------
`redis_home` | Path to redis data directory

Usage
-----

Example playbook:

````yaml
- name: install redis
  hosts: test1
  roles:
    - role: redis
      vars:
        redis_port: 6379
        redis_max_memory: 2g
````