-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathredis.yaml
executable file
·51 lines (42 loc) · 1.12 KB
/
redis.yaml
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
- name: Configure redis server
hosts: redis
gather_facts: True
become: false
tasks:
- name: Install redis server
apt:
name: redis
state: present
- file:
path: /etc/redis
state: directory
mode: 0755
- name: Copy redis configuration
template:
src: conf/controller/redis/redis.conf
dest: /etc/redis/redis.conf
owner: root
group: root
mode: 0644
- name: Copy sentinel configuration
template:
src: conf/controller/redis/sentinel.conf
dest: /etc/redis/sentinel.conf
owner: redis
group: redis
mode: 0644
- name: Copy sentinel service
copy:
src: conf/controller/redis/redis-sentinel.service
dest: /etc/systemd/system/redis-sentinel.service
mode: 0644
- name: Enable sentinel service
command: systemctl enable redis-sentinel.service
- name: Restart redis service
service:
name: redis
state: restarted
- name: Restart sentinel service
service:
name: redis
state: restarted