aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/open-contrail/tasks/provision/-redis-setup.yml
blob: d7776af220dd4adb3fa31193b1ce8ec93f457f36 (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
---
- name: "stop redis server"
  service:
    name: "redis-server"
    state: "stopped"

- name: "modify redis server configuration"
  replace:
    dest: "/etc/redis/redis.conf"
    regexp: "{{ item.regexp }}"
    replace: "{{ item.replace }}"
  with_items:
    - { regexp: "^\\s*bind", replace: "#bind" }
    - { regexp: "^\\s*save", replace: "#save" }
    - { regexp: "^\\s*dbfilename", replace: "#dbfilename" }
    - { regexp: "^\\s*lua-time-limit\\s*\\d*", replace: "lua-time-limit 15000" }

- name: "delete redis dump"
  file:
    dest: "/var/lib/redis/dump.rdb"
    state: "absent"

- name: "start redis server"
  service:
    name: "redis-server"
    state: "started"