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…/Apache Druid/26.0.0/druid/role/tasks/status-check.yml
2024-01-18 15:35:34 +08:00

42 lines
1.4 KiB
YAML

- name: Waitting for Druid running,60s
shell: sleep 60
- block:
- name: Check if the Druid already exists
shell: ps -ef | grep -v grep | grep "org.apache.druid.cli.Main server" | wc -l
register: process_out
- name: To terminate execution
fail:
msg: "Druid on node {{ inventory_hostname }} is not started. Please check"
run_once: true
delegate_to: 127.0.0.1
when: process_out.stdout != '5'
when: node_nums <= (min_cluster_num)
- block:
- name: Check if the Druid already exists
shell: ps -ef | grep -v grep | grep "org.apache.druid.cli.Main server" | wc -l
register: process_out
- name: To terminate execution
fail:
msg: "Druid on node {{ inventory_hostname }} is not started. Please check"
run_once: true
delegate_to: 127.0.0.1
when: process_out.stdout != '3'
when: node_nums > (min_cluster_num) and inventory_hostname in groups['druid'][:2]
- block:
- name: Check if the Druid already exists
shell: ps -ef | grep -v grep | grep "org.apache.druid.cli.Main server" | wc -l
register: process_out
- name: To terminate execution
fail:
msg: "Druid on node {{ inventory_hostname }} is not started. Please check"
run_once: true
delegate_to: 127.0.0.1
when: process_out.stdout != '2'
when: node_nums > (min_cluster_num) and inventory_hostname not in groups['druid'][:2]