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

15 lines
582 B
YAML
Raw Normal View History

- 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'