-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdefaults.jinja
94 lines (83 loc) · 2.87 KB
/
defaults.jinja
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
90
91
92
93
94
{% load_yaml as defaults %}
enabled: false
# bind: listen to selected interfaces by defining a space seperated list of one or more IP addresses
bind: 127.0.0.1 ::1
# port: If port 0 is specified Redis will not listen on a TCP socket.
port: 0
# unixsocket: path for the socket that will be used to listen for incoming connections.
unixsocket: /run/redis/redis.sock
unixsocketperm: 700
# working directory of the redis instance for dbfilename and optional append only file
dir /var/lib/redis
# The name of the dumpfile (relative to working directory)
dbfilename dump.rdb
# Set the number of available databases
databases: 8
# Set a memory usage limit to the specified amount of bytes.
# When the memory limit is reached Redis will try to remove keys
# according to the eviction policy selected (see maxmemory-policy).
maxmemory: 128MB
# maxmemory-policy: how Redis will select what to remove when maxmemory is reached
# noeviction=
# return errors when the memory limit was reached and the client is
# trying to execute commands that could result in more memory to be used
# (most write commands, but DEL and a few more exceptions)
# allkeys-lru=
# evict keys by trying to remove the less recently used (LRU) keys first
# allkeys-lfu=
# evict any key using approximated LFU
# allkeys-random=
# evict keys randomly in order to make space for the new data added
# volatile-lru=
# evict keys by trying to remove the less recently used (LRU) keys
# first, but only among keys that have an expire set,
# in order to make space for the new data added
# volatile-lfu=
# evict using approximated LFU, only keys with an expire set
# volatile-random=
# evict keys randomly in order to make space for the
# new data added, but only evict keys with an expire set
# volatile-ttl=
# evict keys with an expire set, and try to evict keys with a shorter
# time to live (TTL) first, in order to make space for the new data added
maxmemory-policy: volatile-lru
profile: []
{#
- name: recently
maxmemory: 256MB
maxmemory-policy: allkeys-lru
port: 6380
- name: frequently
maxmemory: 128MB
maxmemory-policy: allkeys-lfu
port: 6381
- name: ttl
maxmemory: 256MB
maxmemory-policy: volatile-ttl
port: 6382
- name: permanent
maxmemory: 128MB
maxmemory-policy: noeviction
port: 6383
#}
{% endload %}
{% load_yaml as profile_defaults %}
name: ""
enabled: true
# user: redis
# bind: 127.0.0.1 ::1
# port: 0
# unixsocket: /run/redis-i%/redis-server.sock
# unixsocketperm: 700
# dir: /var/lib/${user}/redis-i%
# dir_perm: 0750
# dbfilename: dump-%i.rdb
# databases: 8
# maxmemory: 128mb
# maxmemory-policy: volatile-lru
# runtime_name: redis-%i
# runtime_dir: /run/redis-%i
# runtime_perm: 2755
{% endload %}
{%- set settings = salt['grains.filter_by']({'default': defaults},
grain='default', default= 'default', merge= salt['pillar.get']('redis', {})) %}