blob: 93f5cc58ff94f25d4bac809235ca337f3061cf7c (
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
|
---
- hosts: localhost
gather_facts: no
ignore_errors: yes
tasks:
- command: redis-cli keys
- name: delete cache keys
command: redis-cli del {{ item }}
loop:
- ansible_facts_localhost
- ansible_inventory_localhost
- ansible_cache_keys
- name: shutdown the server
command: redis-cli shutdown
- name: cleanup set up files
file:
path: "{{ item }}"
state: absent
loop:
- redis-stable.tar.gz
- name: remove executables
file:
state: absent
path: "/usr/local/bin/{{ item }}"
follow: no
become: yes
loop:
- redis-server
- redis-cli
- name: clean the rest of the files
file:
path: "{{ item }}"
state: absent
loop:
- ./redis-stable.tar.gz
- ./redis-stable
|