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 22# # Installation options
33redis_version : 2.8.24
44redis_install_dir : /opt/redis
5+ redis_install_from_source : true
56redis_dir : /var/lib/redis/{{ redis_port }}
67redis_config_file_name : " {{ redis_port }}.conf"
78redis_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 22- include : check_vars.yml
33
44- include : download.yml
5+ when : redis_install_from_source
56 tags :
67 - download
78
89- include : dependencies.yml
10+ when : redis_install_from_source
911 tags :
1012 - install
1113
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
1321 tags :
1422 - install
1523
Original file line number Diff line number Diff line change 1919 - default/redis_sentinel.init.j2
2020 paths :
2121 - ../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')
2323
2424- name : create sentinel systemd service
2525 template :
3333 paths :
3434 - ../templates
3535 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')
3737
3838- name : create systemd tmpfiles configuration
3939 template :
4444 - redis_as_service
4545 - ansible_service_mgr|default() == "systemd"
4646 - (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')
4748
4849- name : reload systemd daemon
4950 systemd :
Original file line number Diff line number Diff line change 1919 - default/redis.init.j2
2020 paths :
2121 - ../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')
2323
2424- name : create redis systemd service
2525 template :
3333 paths :
3434 - ../templates
3535 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')
3737
3838- name : create systemd tmpfiles configuration
3939 template :
4444 - redis_as_service
4545 - ansible_service_mgr|default() == 'systemd'
4646 - (redis_pidfile|dirname).startswith('/var/run') or (redis_pidfile|dirname).startswith('/run')
47+ - not (not redis_install_from_source and redis_service_name == 'redis')
4748
4849- name : reload systemd daemon
4950 systemd :
You can’t perform that action at this time.
0 commit comments