blob: 8aad37a37aca78edf11ef6ae2ca1ca0d7f094959 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
---
- hosts: localhost
vars:
make: "{{ ( ansible_distribution != 'FreeBSD' ) | ternary('make', 'gmake') }}"
tasks:
- name: name ensure make is available
command: "which {{ make }}"
register: has_make
ignore_errors: yes
- command: apk add --no-cache make
when: "has_make is failed and ansible_distribution == 'Alpine'"
become: yes
- package:
name: "{{ make }}"
state: present
become: yes
when: "has_make is failed and ansible_distribution != 'Alpine'"
- name: get the latest stable redis server release
get_url:
url: http://download.redis.io/redis-stable.tar.gz
dest: ./
- name: unzip download
unarchive:
src: redis-stable.tar.gz
dest: ./
- command: "{{ make }}"
args:
chdir: redis-stable
- name: copy the executable into the path
copy:
src: "redis-stable/src/{{ item }}"
dest: /usr/local/bin/
mode: 755
become: yes
loop:
- redis-server
- redis-cli
- name: start the redis server in the background
command: redis-server --daemonize yes
- name: install dependency for the cache plugin
pip:
name: redis>2.4.5
state: present
|