Add possibility to install `mq` dependancies

Provide xymon_plug_mq_package setting that should list `mq`
dependancies.
This commit is contained in:
Jeremy Gardais 2018-02-08 16:02:55 +01:00
parent d0891d6606
commit 514293bfc1
4 changed files with 16 additions and 0 deletions

View File

@ -1,4 +1,9 @@
## v1.X
## Enhancements
* Add possibility to install `mq` dependancies.
## v1.0.1 ## v1.0.1
### Minor Features ### Minor Features

View File

@ -28,6 +28,7 @@ Manage Xymon (client) installation and configuration.
* **xymon_srv_list**: The list of Xymon servers (you must give an hostname, IP,… reachable from any clients) [defaults: `monitoring.{{ ansible_domain }}`]. * **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**: If this role should manage plugins configuration [default: `true`]. * **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_state**: The state of plugin `mq` [default: `true`].
* **xymon_plug_mq_package**: The packages to install to provide `mq` plugin [default: `[ 'libtimedate-perl' ]`].
* **xymon_plug_mq_path**: Configuration file for the `mq` plugin [default: `/etc/xymon/clientlaunch.d/mq.cfg`]. * **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`]. * **xymon_plug_mq_tpl**: Template used to generate the previous config file [default: `etc/xymon/clientlaunch.d/mq.cfg.j2`].
* **xymon_plug_libs_state**: The state of plugin `libs` [default: `true`]. * **xymon_plug_libs_state**: The state of plugin `libs` [default: `true`].

View File

@ -23,6 +23,7 @@ xymon_srv_list: "monitoring.{{ ansible_domain }}"
# plugins # plugins
xymon_plug_manage: true xymon_plug_manage: true
xymon_plug_mq_state: true xymon_plug_mq_state: true
xymon_plug_mq_package: [ 'libtimedate-perl' ]
xymon_plug_mq_path: '/etc/xymon/clientlaunch.d/mq.cfg' xymon_plug_mq_path: '/etc/xymon/clientlaunch.d/mq.cfg'
xymon_plug_mq_tpl: 'etc/xymon/clientlaunch.d/mq.cfg.j2' xymon_plug_mq_tpl: 'etc/xymon/clientlaunch.d/mq.cfg.j2'
xymon_plug_libs_state: true xymon_plug_libs_state: true

View File

@ -44,6 +44,15 @@
# }}} # }}}
# plugins {{{ # plugins {{{
- name: PLUGIN mq packages
package:
name: '{{ item }}'
state: '{{ "present" if xymon_plug_mq_state else "absent" }}'
with_items:
- '{{ xymon_plug_mq_package }}'
when: xymon_plug_manage
notify: restart xymon-client service
- name: PLUGIN mq - name: PLUGIN mq
template: template:
src: '{{ xymon_plug_mq_tpl }}' src: '{{ xymon_plug_mq_tpl }}'