From 8734731355021cdec38e299b7191ea5479317cc0 Mon Sep 17 00:00:00 2001 From: Nathaniel Landau Date: Mon, 18 Mar 2024 16:02:57 -0400 Subject: [PATCH] fix: nomad handler runs correctly --- handlers/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/handlers/main.yml b/handlers/main.yml index 91892ed..006909c 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -90,9 +90,11 @@ - name: "Ensure nomad is really running" ansible.builtin.shell: cmd: "set -o pipefail && sleep 10 && /usr/local/bin/nomad node status -self -short | grep {{ inventory_hostname }}" + args: + executable: /bin/bash register: node_status_response failed_when: node_status_response.rc > 0 - changed_when: node_status_response.rc == 0 + changed_when: false when: "'nostart' not in ansible_run_tags" listen: "restart nomad" # - name: "Ensure sure Nomad service is really running"