diff --git a/tasks/preflight.yml b/tasks/preflight.yml index 4587982..92e5daa 100644 --- a/tasks/preflight.yml +++ b/tasks/preflight.yml @@ -2,5 +2,5 @@ - name: check collectors fail: msg: "Collector cannot be both disabled and enabled" - when: '"{{ item }}" in "{{ node_exporter_enabled_collectors }}"' + when: item in node_exporter_enabled_collectors with_items: "{{ node_exporter_disabled_collectors }}"