forked from idealista/redis_role
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yml
89 lines (72 loc) · 2.56 KB
/
main.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
## General
redis_version: 7.2.3
# Redis 5
redis_cluster_legacy: false
# Redis <5
# redis_cluster_legacy: true
redis_ruby_gem_version: 4.1.3
# cluster or single
redis_mode: single
# set this to false when installing the role inside container
redis_os_tuning: true
# Enables/Disables 'make test' step during installation
# Is an optional step: (https://redis.io/topics/quickstart)
# 'At this point you can try if your build works correctly by typing make test,
# but this is an optional step'
redis_check_build: false
## Service options
# Owner
redis_user: redis
redis_group: redis
# Files & Paths
redis_build_path: "/usr/src/redis" # redis source will be here
redis_bin_path: "/usr/local/bin" # redis source will be here
redis_conf_path: "/usr/local/etc/redis" # redis configuration and running instance data will be here
redis_server_conf_template_path: redis.conf.j2
redis_manager_template_path: instance-manager.sh.j2
redis_service_template_path: redis-server.service.j2
redis_log_path: "/var/log/redis"
# current state: started, stopped
redis_service_state: started
redis_cluster_replicas: 0
redis_install_new_version: false # set this to true to force an installation
# start on boot
redis_service_enabled: true
#### redis.conf variables ####
# this include default conf file
include_redis_default_conf: true
redis_save:
- 900 1
- 300 10
- 60 10000
# you can include here redis.conf's vars
# use quotation mark to avoid python value override
redis_confs:
bind: "0.0.0.0"
protected-mode: "no"
port: "6379" # this is mandatory
pidfile: "/var/run/redis/redis.pid"
loglevel: "notice"
logfile: "{{ redis_log_path }}/redis.log"
databases: "16"
rdbcompression: "yes"
rdbchecksum: "yes"
supervised: "systemd"
slave-serve-stale-data: "yes"
slave-read-only: "yes"
stop-writes-on-bgsave-error: "yes"
# include to start node as cluster member
# cluster-node-timeout: "2000"
# cluster-enabled: "yes"
# cluster-config-file: node.conf
appendonly: "yes"
appendfilename: "appendonly-db.aof"
dbfilename: "dump.rdb"
daemonize: "yes" # mandatory for cluster node
# ATTENTION since version 5.0.0 we have introduced authentication and it is important to use two variables:
# - redis_auth which is mandatory to have a value (true/false)
# - redis_password which defines the password that will be set, remember to put it
# in the vault so that it is not left unencrypted (it must be 30 characters, with numbers, upper and lower case)
# IF THESE VARIABLES ARE NOT CORRECTLY CONFIGURED, THE ROLE INSTALLATION WILL FAIL WITH AN EXPLANATORY MESSAGE.
redis_auth: true