commit | author | age
|
1de623
|
1 |
--- |
OB |
2 |
# Variable setup. |
|
3 |
- name: Include OS-specific variables. |
|
4 |
include_vars: "{{ ansible_os_family }}.yml" |
|
5 |
|
|
6 |
- name: Define redis_package. |
|
7 |
set_fact: |
|
8 |
redis_package: "{{ __redis_package }}" |
|
9 |
when: redis_package is not defined |
|
10 |
|
|
11 |
# Setup/install tasks. |
|
12 |
- include_tasks: setup-RedHat.yml |
|
13 |
when: ansible_os_family == 'RedHat' |
|
14 |
|
|
15 |
- include_tasks: setup-Debian.yml |
|
16 |
when: ansible_os_family == 'Debian' |
|
17 |
|
|
18 |
- include_tasks: setup-Archlinux.yml |
|
19 |
when: ansible_os_family == 'Archlinux' |
|
20 |
|
|
21 |
- name: Ensure Redis is configured. |
|
22 |
template: |
|
23 |
src: redis.conf.j2 |
|
24 |
dest: "{{ redis_conf_path }}" |
|
25 |
mode: 0644 |
|
26 |
notify: restart redis |
|
27 |
|
|
28 |
- name: Ensure Redis is running and enabled on boot. |
|
29 |
service: "name={{ redis_daemon }} state=started enabled=yes" |