Use path variables for Redis. Changes #31
This commit is contained in:
parent
6a8cee385b
commit
b00f1a4c44
2 changed files with 7 additions and 7 deletions
|
@ -5,7 +5,7 @@
|
|||
state: reloaded
|
||||
|
||||
- name: 'Restart redis-{{ redis_instance }}'
|
||||
command: s6-svc -wR -T 15000 -ru /run/service/redis-{{ redis_instance }}
|
||||
command: s6-svc -wR -T 15000 -ru {{ s6_scan_dir }}/redis-{{ redis_instance }}
|
||||
|
||||
- name: 'Restart redis-{{ redis_instance }} log'
|
||||
command: s6-svc -wR -T 5000 -ru /run/service/redis-{{ redis_instance }}-log
|
||||
command: s6-svc -wR -T 5000 -ru {{ s6_scan_dir }}/redis-{{ redis_instance }}-log
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
- name: 'Create redis-{{ redis_instance }} service directories'
|
||||
file:
|
||||
path: '/etc/s6-rc/service/redis-{{ redis_instance}}{{ item }}'
|
||||
path: '{{ s6_etc_dir }}/service/redis-{{ redis_instance}}{{ item }}'
|
||||
state: directory
|
||||
owner: root
|
||||
group: wheel
|
||||
|
@ -43,7 +43,7 @@
|
|||
|
||||
- name: 'Generate redis-{{ redis_instance }} service scripts'
|
||||
template:
|
||||
dest: '/etc/s6-rc/service/redis-{{ redis_instance }}{{ item }}'
|
||||
dest: '{{ s6_etc_dir }}/service/redis-{{ redis_instance }}{{ item }}'
|
||||
src: 'redis{{ item }}.j2'
|
||||
mode: 0555
|
||||
owner: root
|
||||
|
@ -56,7 +56,7 @@
|
|||
|
||||
- name: 'Generate redis-{{ redis_instance }} service configuration'
|
||||
copy:
|
||||
dest: '/etc/s6-rc/service/redis-{{ redis_instance}}{{ item.name }}'
|
||||
dest: '{{ s6_etc_dir }}/service/redis-{{ redis_instance}}{{ item.name }}'
|
||||
content: '{{ item.content }}'
|
||||
mode: 0444
|
||||
owner: root
|
||||
|
@ -83,13 +83,13 @@
|
|||
meta: flush_handlers
|
||||
|
||||
- name: 'Start redis-{{ redis_instance }}'
|
||||
command: 'fdmove -c 2 1 s6-rc -u -v 2 -t 15000 change redis-{{ redis_instance }}'
|
||||
command: 'fdmove -c 2 1 s6-rc -l {{ s6_live_dir }} -u -v 2 -t 15000 change redis-{{ redis_instance }}'
|
||||
register: change
|
||||
changed_when: change.stdout | length > 0
|
||||
|
||||
- name: 'Enable redis-{{ redis_instance }}'
|
||||
lineinfile:
|
||||
path: /etc/s6-rc/service/enabled/contents
|
||||
path: '{{ s6_etc_dir }}/service/enabled/contents'
|
||||
regexp: "^redis-{{ redis_instance }}$"
|
||||
line: 'redis-{{ redis_instance }}'
|
||||
state: present
|
||||
|
|
Loading…
Reference in a new issue