1 Star 1 Fork 0

安家/tidb-ansible

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
unsafe_cleanup.yml 3.57 KB
一键复制 编辑 原始数据 按行查看 历史
---
# Copyright 2016 PingCAP, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# See the License for the specific language governing permissions and
# limitations under the License.
# The playbook of TiDB
- import_playbook: stop.yml
- import_playbook: unsafe_cleanup_container.yml
when: deployment_method == 'docker'
- hosts: monitored_servers
tasks:
- name: clean systemd config
file: path="/etc/systemd/system/{{ item }}" state=absent
become: true
when: process_supervision == 'systemd'
with_items:
- node_exporter-{{ node_exporter_port }}.service
- blackbox_exporter-{{ blackbox_exporter_port }}.service
- hosts: alertmanager_servers
tasks:
- name: clean systemd config
file: path="/etc/systemd/system/{{ item }}" state=absent
become: true
when: process_supervision == 'systemd'
with_items:
- alertmanager-{{ alertmanager_port }}.service
- hosts: monitoring_servers
tasks:
- name: clean systemd config
file: path="/etc/systemd/system/{{ item }}" state=absent
become: true
when: process_supervision == 'systemd'
with_items:
- pushgateway-{{ pushgateway_port }}.service
- prometheus-{{ prometheus_port }}.service
- hosts: kafka_exporter_servers
tasks:
- name: clean systemd config
file: path="/etc/systemd/system/{{ item }}" state=absent
become: true
when: process_supervision == 'systemd'
with_items:
- kafka_exporter-{{ kafka_exporter_port }}.service
- hosts: tidb_servers
tasks:
- name: clean systemd config
file: path="/etc/systemd/system/{{ item }}" state=absent
become: true
when: process_supervision == 'systemd'
with_items:
- tidb-{{ tidb_port }}.service
- hosts: pump_servers
tasks:
- name: clean systemd config
file: path="/etc/systemd/system/{{ item }}" state=absent
become: true
when:
- enable_binlog|default(false)
- process_supervision == 'systemd'
with_items:
- pump-{{ pump_port }}.service
- hosts: tikv_servers
tasks:
- name: clean systemd config
file: path="/etc/systemd/system/{{ item }}" state=absent
become: true
when: process_supervision == 'systemd'
with_items:
- tikv-{{ tikv_port }}.service
- name: cleaning up wal dir
file: path={{ wal_dir }} state=absent
when: "wal_dir is defined"
- name: cleaning up raftdb dir
file: path={{ raftdb_path }} state=absent
when: "raftdb_path is defined"
- hosts: pd_servers
tasks:
- name: clean systemd config
file: path="/etc/systemd/system/{{ item }}" state=absent
become: true
when: process_supervision == 'systemd'
with_items:
- pd-{{ pd_client_port }}.service
- hosts: grafana_servers
tasks:
- name: clean systemd config
file: path="/etc/systemd/system/{{ item }}" state=absent
become: true
when: process_supervision == 'systemd'
with_items:
- grafana-{{ grafana_port }}.service
- grafana_collector-{{ grafana_collector_port }}.service
- hosts: all
tasks:
- name: using rm command to clean up deploy_dir
shell: "rm -rf {{ deploy_dir }}/*"
- name: cleaning up deploy dir
file: path={{ deploy_dir }} state=absent
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/anjia/tidb-ansible.git
git@gitee.com:anjia/tidb-ansible.git
anjia
tidb-ansible
tidb-ansible
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385