diff --git a/CHANGELOG.md b/CHANGELOG.md index bd6a4d1..6ae5e89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ### Features * Add the possibility to manage 'xymon' user's groups. -* Manage `mq` plugin. +* Manage `mq` plugin and state. ## v1.0 diff --git a/README.md b/README.md index be45e96..b2b6583 100644 --- a/README.md +++ b/README.md @@ -26,9 +26,10 @@ Manage Xymon (client) installation and configuration. * **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 }}`]. -* **xymon_plug_manage** : [default : `true`]. -* **xymon_plug_mq_path** : [default : `/etc/xymon/clientlaunch.d/mq.cfg`]. -* **xymon_plug_mq_tpl** : [default : `etc/xymon/clientlaunch.d/mq.cfg.j2`]. +* **xymon_plug_manage** : If this role should manage plugins configuration [default : `true`]. +* **xymon_plug_mq_state** : The state of plugin `mq` [default : `true`]. +* **xymon_plug_mq_path** : Configuration file for the `mq` plugin [default : `/etc/xymon/clientlaunch.d/mq.cfg`]. +* **xymon_plug_mq_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/mq.cfg.j2`]. ### OS Specific Variables diff --git a/defaults/main.yml b/defaults/main.yml index 5010d0d..b5f52d0 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -22,5 +22,6 @@ xymon_srv_list: "monitoring.{{ ansible_domain }}" # plugins xymon_plug_manage: true +xymon_plug_mq_state: true xymon_plug_mq_path: '/etc/xymon/clientlaunch.d/mq.cfg' xymon_plug_mq_tpl: 'etc/xymon/clientlaunch.d/mq.cfg.j2' diff --git a/templates/etc/xymon/clientlaunch.d/mq.cfg.j2 b/templates/etc/xymon/clientlaunch.d/mq.cfg.j2 index b9ba2d8..ef437d3 100644 --- a/templates/etc/xymon/clientlaunch.d/mq.cfg.j2 +++ b/templates/etc/xymon/clientlaunch.d/mq.cfg.j2 @@ -1,5 +1,5 @@ [mq] - DISABLED + "{{ '#DISABLED' if xymon_plug_mq_state else 'DISABLED' }}" ENVFILE /etc/xymon/xymonclient.cfg CMD $XYMONCLIENTHOME/ext/mq LOGFILE /var/log/xymon/xymonclient.log