From 98f7fdbaadd9089dd4327600d4c2286e47161b6e Mon Sep 17 00:00:00 2001 From: Jan-Peter Alten Date: Thu, 24 Feb 2022 07:40:44 +0100 Subject: [PATCH] Do not fail if state is not started When using node_exporter_state stopped the role will fail, while nodeexporter is expected to not respond. --- tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/main.yml b/tasks/main.yml index 5263439..0086a21 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -56,3 +56,4 @@ return_content: true register: metrics_output failed_when: "'Metrics' not in metrics_output.content" + when: node_exporter_state == "started"