From 5c6db266dad4b911dcda665cac2884b0775fd463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?victor=20h=C3=A9ry?= Date: Wed, 21 Feb 2018 16:43:29 +0100 Subject: [PATCH] xymon-client: disabling checks works only on deb >=8 --- README.md | 2 +- roles/xymon-client/tasks/client_debian.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 21952b0..2f5d8a3 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,7 @@ monitoring_file: dns ## Where to store the host in hosts.d xymon server director monitoring_section: dns ## Name of the page to use in xymon server webpage tree view (optionnal) monitoring_ip: xxx.xxx.xxx.xxx ## IP address of the client to add in server (mandatory) xymon_checks: "#" ## Checks to use for this client. Default '#' do a simple ping check -xymon_disabled_sondes: ## Allow to disable checks on clients (DEBIAN only) +xymon_disabled_sondes: ## Allow to disable checks on clients (DEBIAN >= 8 only) - ntpq - libs diff --git a/roles/xymon-client/tasks/client_debian.yml b/roles/xymon-client/tasks/client_debian.yml index 61b6fe8..8b08124 100644 --- a/roles/xymon-client/tasks/client_debian.yml +++ b/roles/xymon-client/tasks/client_debian.yml @@ -88,7 +88,7 @@ backrefs: yes with_items: "{{ xymon_disabled_sondes }}" notify: restart xymon-client - when: ansible_distribution == 'Debian' and xymon_disabled_sondes is defined + when: ansible_distribution == 'Debian' and xymon_disabled_sondes is defined and ansible_distribution_major_version|int >= 8 - name: Drop disabled sonde on Xymon server tags: @@ -97,4 +97,4 @@ command: /usr/lib/xymon/server/bin/xymon 127.0.0.1 "drop {{ ansible_nodename }} {{ item }}" with_items: "{{ xymon_disabled_sondes }}" delegate_to: "{{ xymon_server }}" - when: ansible_distribution == 'Debian' and xymon_disabled_sondes is defined + when: ansible_distribution == 'Debian' and xymon_disabled_sondes is defined and ansible_distribution_major_version|int >= 8