From f6a61e107b766682c462f2a1f092b4d6e4805d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Fri, 11 Aug 2017 14:48:46 +0200 Subject: [PATCH] Allow to set Xymon servers list for `xymon-client` config. --- CHANGELOG.md | 1 + README.md | 1 + defaults/main.yml | 3 +++ templates/etc/default/xymon-client.j2 | 2 +- 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44ac2c3..de86f1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,3 +6,4 @@ * Manage `xymon-client` default configuration file. * Manage `xymon-client` service. * Add possibility to set the value of CLIENTHOSTNAME `xymon-client` value. +* Allow to set Xymon servers list for `xymon-client` config. diff --git a/README.md b/README.md index 6c0c917..a25b49b 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ Manage Xymon (client) installation and configuration. * **xymon_cli_service_manage** : If `xymon-client` service should be managed with this role [default : `true`]. * **xymon_cli_service_name** : `xymon-client` service name [default : `xymon-client`]. * **xymon_cli_service_enabled** : Set `xymon-client` service available at startup [default : `true`]. +* **xymon_srv_list** : The list of Xymon servers (you must give an hostname, IP,… reachable from any clients) [defaults : `monitoring.{{ ansible_domain }}`]. ### OS Specific Variables diff --git a/defaults/main.yml b/defaults/main.yml index 19f63c5..51d6bd6 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -15,3 +15,6 @@ xymon_cli_hostname: "{{ ansible_fqdn }}" xymon_cli_service_manage: true xymon_cli_service_name: 'xymon-client' xymon_cli_service_enabled: true + +# server +xymon_srv_list: "monitoring.{{ ansible_domain }}" diff --git a/templates/etc/default/xymon-client.j2 b/templates/etc/default/xymon-client.j2 index 200c7aa..f2c7bec 100644 --- a/templates/etc/default/xymon-client.j2 +++ b/templates/etc/default/xymon-client.j2 @@ -10,7 +10,7 @@ # or (multiple servers) # XYMONSERVERS="10.0.0.1 192.168.1.1" -XYMONSERVERS="127.0.0.1" +XYMONSERVERS="{{ xymon_srv_list }}" # The defaults usually suffice for the rest of this file, # but you can tweak the hostname that the client reports