From d32d9aeedd24a28c4b93f7646184de179eeb565c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Thu, 8 Feb 2018 16:07:22 +0100 Subject: [PATCH] Add possibility to install `libs` dependancies. --- CHANGELOG.md | 1 + README.md | 1 + defaults/main.yml | 1 + tasks/main.yml | 9 +++++++++ 4 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b9047c..71f1e75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Enhancements * Add possibility to install `mq` dependancies. +* Add possibility to install `libs` dependancies. ## v1.0.1 diff --git a/README.md b/README.md index bc62668..2cfbac0 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ Manage Xymon (client) installation and configuration. * **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_libs_state** : The state of plugin `libs` [default : `true`]. +* **xymon_plug_libs_package** : The packages to install to provide `libs` plugin [default : `[ 'binutils', 'lsof', 'libyaml-tiny-perl', 'libsort-naturally-perl' ]`]. * **xymon_plug_libs_path** : Configuration file for the `libs` plugin [default : `/etc/xymon/clientlaunch.d/libs.cfg`]. * **xymon_plug_libs_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/libs.cfg.j2`]. diff --git a/defaults/main.yml b/defaults/main.yml index 6da7a60..c4167c3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -27,5 +27,6 @@ xymon_plug_mq_package: [ 'libtimedate-perl' ] xymon_plug_mq_path: '/etc/xymon/clientlaunch.d/mq.cfg' xymon_plug_mq_tpl: 'etc/xymon/clientlaunch.d/mq.cfg.j2' xymon_plug_libs_state: true +xymon_plug_libs_package: [ 'binutils', 'lsof', 'libyaml-tiny-perl', 'libsort-naturally-perl' ] xymon_plug_libs_path: '/etc/xymon/clientlaunch.d/libs.cfg' xymon_plug_libs_tpl: 'etc/xymon/clientlaunch.d/libs.cfg.j2' diff --git a/tasks/main.yml b/tasks/main.yml index 11eea73..c0f28f9 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -63,6 +63,15 @@ when: xymon_plug_manage notify: restart xymon-client service +- name: PLUGIN libs packages + package: + name: '{{ item }}' + state: '{{ "present" if xymon_plug_libs_state else "absent" }}' + with_items: + - '{{ xymon_plug_libs_package }}' + when: xymon_plug_manage + notify: restart xymon-client service + - name: PLUGIN libs template: src: '{{ xymon_plug_libs_tpl }}'