diff --git a/roles/ensure-zookeeper/tasks/main.yaml b/roles/ensure-zookeeper/tasks/main.yaml index fa9e6e54d..d0db2e760 100644 --- a/roles/ensure-zookeeper/tasks/main.yaml +++ b/roles/ensure-zookeeper/tasks/main.yaml @@ -52,7 +52,11 @@ - name: Ensure Zookeeper not running command: pkill -f zookeeper - ignore_errors: true + register: _pkill + # 0 is killed + # 1 is no process matched + # >1 is some sort of actual error + failed_when: _pkill.rc > 1 become: true - name: Start Zookeeper