1
殺死一個任務的最好方法是什麼?我將kafka作爲常規可執行文件運行,而不是作爲服務運行。當我向它發送殺戮時,需要一段時間才能完成並關閉。在發送kill命令以確保服務實際停止之前,我希望能夠繼續等待。在Ansible中殺死一個任務
到目前爲止,這是我的,我不知道如何可靠地做到這一點。
---
- name: Stopping Kafka
command: "bin/kafka-server-stop.sh config/server.properties"
args:
chdir: "{{base_apps}}/kafka/kafka_2.11-0.9.0.1"
ignore_errors: yes
感謝
也許嘗試把「nohup斌/ kafka-server-stop.sh配置/ server.properties」 –
不會馬上踢出去嗎? – browskie