From ba78246865a4e632ad8644012dbccf661d71aaa5 Mon Sep 17 00:00:00 2001 From: Jan Kurik Date: Fri, 19 Jul 2024 21:45:02 +0200 Subject: [PATCH] Use short version of 'defined' filter in pmie.yaml --- roles/pcp/tasks/pmie.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/pcp/tasks/pmie.yml b/roles/pcp/tasks/pmie.yml index d32bfb0..427b84e 100644 --- a/roles/pcp/tasks/pmie.yml +++ b/roles/pcp/tasks/pmie.yml @@ -53,10 +53,10 @@ loop: "{{ __pcp_global_webhook_action_status.results }}" changed_when: - pcp_pmie_endpoint | length > 0 - - item.found is defined and item.found == 0 + - item.found | d(-1) == 0 when: - pcp_pmie_endpoint | length > 0 - - item.found is defined and item.found == 0 + - item.found | d(-1) == 0 register: __pcp_register_changed_actions_for_hosts # yamllint enable rule:line-length @@ -76,10 +76,10 @@ loop: "{{ __pcp_global_webhook_endpoint_status.results }}" changed_when: - pcp_pmie_endpoint | length > 0 - - item.found is defined and item.found == 0 + - item.found | d(-1) == 0 when: - pcp_pmie_endpoint | length > 0 - - item.found is defined and item.found == 0 + - item.found | d(-1) == 0 register: __pcp_register_changed_actions_for_hosts # yamllint enable rule:line-length