From b4a4eda55bdc03466f6b9d8c79bc24585fe4b0f9 Mon Sep 17 00:00:00 2001 From: Jean-Marie Mineau Date: Wed, 22 Sep 2021 15:10:43 +0200 Subject: [PATCH] ignore permutation of targets --- roles/prometheus-node-exporter/tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/prometheus-node-exporter/tasks/main.yml b/roles/prometheus-node-exporter/tasks/main.yml index aba7fd6..6dda7ad 100644 --- a/roles/prometheus-node-exporter/tasks/main.yml +++ b/roles/prometheus-node-exporter/tasks/main.yml @@ -99,6 +99,7 @@ - name: Add the node to the targets set_fact: server_target: "[{{ server_target[0] | combine({'targets': [lan_address]}, list_merge='append_rp') }}]" + when: lan_address not in server_target.0.targets - name: Put the new target list copy: