This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
galaxy-deployment-ansible-d…/Clickhouse/21.8.13.1/clickhouse/role/tasks/cluster/status-check.yml
2024-01-18 15:35:34 +08:00

15 lines
582 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

- name: Waitting for Clickhouse running,30s
shell: sleep 30
- name: Check the Clickhouse service status
shell: clickhouse-client -h {{ inventory_hostname }} --port 9001 -m -u default --password {{ clickhouse_default_pin }} --query "SELECT version();" | grep "21.8.13.1.altinitystable" | wc -l
register: check_mode
- name: To terminate execution
fail:
msg: "检测到 {{ inventory_hostname }} 节点Clickhouse未正常启动请保留日志反馈路径{{ deploy_dir }}/clickhouse/logs"
run_once: true
delegate_to: 127.0.0.1
when: check_mode.stdout != '1'