File tree Expand file tree Collapse file tree 5 files changed +24
-5
lines changed Expand file tree Collapse file tree 5 files changed +24
-5
lines changed Original file line number Diff line number Diff line change 2
2
# # Installation options
3
3
redis_version : 2.8.24
4
4
redis_install_dir : /opt/redis
5
+ redis_install_from_source : true
5
6
redis_dir : /var/lib/redis/{{ redis_port }}
6
7
redis_config_file_name : " {{ redis_port }}.conf"
7
8
redis_download_url : " http://download.redis.io/releases/redis-{{ redis_version }}.tar.gz"
Original file line number Diff line number Diff line change
1
+ - name : Install redis from repo
2
+ package :
3
+ name : redis
4
+
5
+ - name : Install redis-sentinel from repo
6
+ package :
7
+ name : redis-sentinel
8
+ when : redis_sentinel
Original file line number Diff line number Diff line change 2
2
- include : check_vars.yml
3
3
4
4
- include : download.yml
5
+ when : redis_install_from_source
5
6
tags :
6
7
- download
7
8
8
9
- include : dependencies.yml
10
+ when : redis_install_from_source
9
11
tags :
10
12
- install
11
13
12
- - include : install.yml
14
+ - include : install_from_source.yml
15
+ when : redis_install_from_source
16
+ tags :
17
+ - install
18
+
19
+ - include : install_from_repo.yml
20
+ when : not redis_install_from_source
13
21
tags :
14
22
- install
15
23
Original file line number Diff line number Diff line change 19
19
- default/redis_sentinel.init.j2
20
20
paths :
21
21
- ../templates
22
- when : redis_as_service and ansible_service_mgr|default() != "systemd"
22
+ when : redis_as_service and ansible_service_mgr|default() != "systemd" and not (not redis_install_from_source and redis_service_name == 'redis')
23
23
24
24
- name : create sentinel systemd service
25
25
template :
33
33
paths :
34
34
- ../templates
35
35
register : sentinel_unit_file
36
- when : redis_as_service and ansible_service_mgr|default() == "systemd"
36
+ when : redis_as_service and ansible_service_mgr|default() == "systemd" and not (not redis_install_from_source and redis_service_name == 'redis')
37
37
38
38
- name : create systemd tmpfiles configuration
39
39
template :
44
44
- redis_as_service
45
45
- ansible_service_mgr|default() == "systemd"
46
46
- (redis_sentinel_pidfile|dirname).startswith("/var/run") or (redis_sentinel_pidfile|dirname).startswith("/run")
47
+ - not (not redis_install_from_source and redis_service_name == 'redis')
47
48
48
49
- name : reload systemd daemon
49
50
systemd :
Original file line number Diff line number Diff line change 19
19
- default/redis.init.j2
20
20
paths :
21
21
- ../templates
22
- when : redis_as_service and ansible_service_mgr|default() != "systemd"
22
+ when : redis_as_service and ansible_service_mgr|default() != "systemd" and not (not redis_install_from_source and redis_service_name == 'redis')
23
23
24
24
- name : create redis systemd service
25
25
template :
33
33
paths :
34
34
- ../templates
35
35
register : redis_unit_file
36
- when : redis_as_service and ansible_service_mgr|default() == "systemd"
36
+ when : redis_as_service and ansible_service_mgr|default() == "systemd" and not (not redis_install_from_source and redis_service_name == 'redis')
37
37
38
38
- name : create systemd tmpfiles configuration
39
39
template :
44
44
- redis_as_service
45
45
- ansible_service_mgr|default() == 'systemd'
46
46
- (redis_pidfile|dirname).startswith('/var/run') or (redis_pidfile|dirname).startswith('/run')
47
+ - not (not redis_install_from_source and redis_service_name == 'redis')
47
48
48
49
- name : reload systemd daemon
49
50
systemd :
You can’t perform that action at this time.
0 commit comments