1 Star 1 Fork 0

安家/tidb-ansible

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
stop_drainer.yml 1.51 KB
一键复制 编辑 原始数据 按行查看 历史
Louis 提交于 2018-12-17 19:36 . playbook: refine wait_for tasks (#640)
---
# Copyright 2018 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
- name: check config locally
hosts: localhost
any_errors_fatal: true
tags:
- always
roles:
- check_config_static
- name: gather all facts, and check dest
hosts: all
any_errors_fatal: true
tags:
- always
roles:
- check_config_dynamic
- hosts: drainer_servers
tags:
- drainer
tasks:
- name: stop drainer by supervise
shell: cd {{ deploy_dir }}/scripts && ./stop_drainer.sh
when:
- enable_binlog|default(false)
- process_supervision == 'supervise'
- name: stop drainer by systemd
systemd: name=drainer-{{ drainer_port }}.service state=stopped enabled=no
become: true
when:
- enable_binlog|default(false)
- process_supervision == 'systemd'
- name: wait until the drainer port is down
wait_for:
host: "{{ ansible_host }}"
port: "{{ drainer_port }}"
state: stopped
msg: "the drainer port {{ drainer_port }} is not down"
when: enable_binlog|default(false)
马建仓 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