diff --git a/CHANGELOG.md b/CHANGELOG.md index c7d1331..bd6a4d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features * Add the possibility to manage 'xymon' user's groups. +* Manage `mq` plugin. ## v1.0 diff --git a/README.md b/README.md index 3ab6dc2..be45e96 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,10 @@ * [OS Specific Variables](#os-specific-variables) 3. [Example Playbook](#example-playbook) 4. [Configuration](#configuration) -5. [Development](#development) -6. [License](#license) -7. [Author Information](#author-information) +4. [Plugins](#plugins) +6. [Development](#development) +7. [License](#license) +8. [Author Information](#author-information) ## Overview @@ -25,6 +26,9 @@ 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`]. ### OS Specific Variables @@ -49,6 +53,11 @@ This role will : * Manage `xymon-client` configuration and service. * Add 'xymon' user to new groups. +## Plugins + +Some plugins and options can be managed with this role : +* mq : Check mail queue. + ## Development This source code comes from our [Gogs instance][xymon source] and the [Github repo][xymon github] exist just to be able to send the role to Ansible Galaxy… diff --git a/defaults/main.yml b/defaults/main.yml index 1909ea8..5010d0d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -19,3 +19,8 @@ xymon_cli_service_enabled: true # server xymon_srv_list: "monitoring.{{ ansible_domain }}" + +# plugins +xymon_plug_manage: 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/tasks/main.yml b/tasks/main.yml index ea0dcdd..6ca1861 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -42,3 +42,15 @@ enabled: '{{ xymon_cli_service_enabled }}' when: xymon_cli_service_manage # }}} + +# plugins {{{ +- name: PLUGIN mq + template: + src: '{{ xymon_plug_mq_tpl }}' + dest: '{{ xymon_plug_mq_path }}' + owner: root + group: root + mode: 0644 + when: xymon_plug_manage + notify: restart xymon-client service +# }}} diff --git a/templates/etc/xymon/clientlaunch.d/mq.cfg.j2 b/templates/etc/xymon/clientlaunch.d/mq.cfg.j2 new file mode 100644 index 0000000..b9ba2d8 --- /dev/null +++ b/templates/etc/xymon/clientlaunch.d/mq.cfg.j2 @@ -0,0 +1,6 @@ +[mq] + DISABLED + ENVFILE /etc/xymon/xymonclient.cfg + CMD $XYMONCLIENTHOME/ext/mq + LOGFILE /var/log/xymon/xymonclient.log + INTERVAL 5m