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
|
state: reloaded
|
||||||
|
|
||||||
- name: 'Restart redis-{{ redis_instance }}'
|
- 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'
|
- 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'
|
- name: 'Create redis-{{ redis_instance }} service directories'
|
||||||
file:
|
file:
|
||||||
path: '/etc/s6-rc/service/redis-{{ redis_instance}}{{ item }}'
|
path: '{{ s6_etc_dir }}/service/redis-{{ redis_instance}}{{ item }}'
|
||||||
state: directory
|
state: directory
|
||||||
owner: root
|
owner: root
|
||||||
group: wheel
|
group: wheel
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
- name: 'Generate redis-{{ redis_instance }} service scripts'
|
- name: 'Generate redis-{{ redis_instance }} service scripts'
|
||||||
template:
|
template:
|
||||||
dest: '/etc/s6-rc/service/redis-{{ redis_instance }}{{ item }}'
|
dest: '{{ s6_etc_dir }}/service/redis-{{ redis_instance }}{{ item }}'
|
||||||
src: 'redis{{ item }}.j2'
|
src: 'redis{{ item }}.j2'
|
||||||
mode: 0555
|
mode: 0555
|
||||||
owner: root
|
owner: root
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
|
|
||||||
- name: 'Generate redis-{{ redis_instance }} service configuration'
|
- name: 'Generate redis-{{ redis_instance }} service configuration'
|
||||||
copy:
|
copy:
|
||||||
dest: '/etc/s6-rc/service/redis-{{ redis_instance}}{{ item.name }}'
|
dest: '{{ s6_etc_dir }}/service/redis-{{ redis_instance}}{{ item.name }}'
|
||||||
content: '{{ item.content }}'
|
content: '{{ item.content }}'
|
||||||
mode: 0444
|
mode: 0444
|
||||||
owner: root
|
owner: root
|
||||||
|
@ -83,13 +83,13 @@
|
||||||
meta: flush_handlers
|
meta: flush_handlers
|
||||||
|
|
||||||
- name: 'Start redis-{{ redis_instance }}'
|
- 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
|
register: change
|
||||||
changed_when: change.stdout | length > 0
|
changed_when: change.stdout | length > 0
|
||||||
|
|
||||||
- name: 'Enable redis-{{ redis_instance }}'
|
- name: 'Enable redis-{{ redis_instance }}'
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/s6-rc/service/enabled/contents
|
path: '{{ s6_etc_dir }}/service/enabled/contents'
|
||||||
regexp: "^redis-{{ redis_instance }}$"
|
regexp: "^redis-{{ redis_instance }}$"
|
||||||
line: 'redis-{{ redis_instance }}'
|
line: 'redis-{{ redis_instance }}'
|
||||||
state: present
|
state: present
|
||||||
|
|
Loading…
Reference in a new issue