-
Notifications
You must be signed in to change notification settings - Fork 265
/
redis-rm.yml
executable file
·55 lines (53 loc) · 2.09 KB
/
redis-rm.yml
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
52
53
54
55
#!/usr/bin/env ansible-playbook
---
#==============================================================#
# File : redis-rm.yml
# Desc : remove redis cluster / node /instance
# Ctime : 2022-03-20
# Mtime : 2023-09-14
# Path : redis-rm.yml
# Author : Ruohang Feng ([email protected])
# License : AGPLv3
#==============================================================#
- name: REDIS REMOVE
hosts: all
become: true
gather_facts: no
roles: [{ role: node_id }, { role: redis_remove }]
vars:
#redis_safeguard: false # prevent purging running redis instance?
#redis_clean: true # purging existing redis during initialization?
redis_uninstall: false # uninstall redis & redis_exporter? false by default
#--------------------------------------------------------------#
# Usage
#--------------------------------------------------------------#
# Remove cluster `redis-test`
# redis-rm.yml -l redis-test
#
# Remove cluster `redis-test`, and uninstall packages
# redis-rm.yml -l redis-test -e redis_uninstall=true
#
# Remove all instance on redis node 10.10.10.13
# redis-rm.yml -l 10.10.10.13
#
# Remove one specific instance 10.10.10.13:6379
# redis-rm.yml -l 10.10.10.13 -e redis_port=6379
#
#--------------------------------------------------------------#
# Utils
#--------------------------------------------------------------#
#
# bin/redis-rm redis-ms # remove redis cluster 'redis-ms'
# bin/redis-rm 10.10.10.10 # remove redis node '10.10.10.10'
# bin/redis-rm 10.10.10.10 6379 # remove redis instance '10.10.10.10:6379'
#
#--------------------------------------------------------------#
# Tasks
#--------------------------------------------------------------#
# register : remove monitor target from prometheus
# redis_exporter : stop and disable redis_exporter
# redis : stop and disable redis cluster/node/instance
# redis_data : remove redis data (rdb, aof)
# redis_pkg : uninstall redis & redis_exporter packages
#--------------------------------------------------------------#
...