From 647b4a816dcf57b66ac829bfbd9669747b2261af Mon Sep 17 00:00:00 2001 From: Gardouille Date: Mon, 16 Feb 2015 18:24:46 +0100 Subject: [PATCH] xymon::client::install : Install the recommends and suggests packages for hobbit-plugins package (from Debian) + correct warnings from puppet lint. --- manifests/client.pp | 1 + manifests/client/config.pp | 4 ++-- manifests/client/install.pp | 6 ++++++ manifests/params.pp | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/manifests/client.pp b/manifests/client.pp index 19b1a8c..a9fd5e0 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -38,6 +38,7 @@ class xymon::client ( $main_cfg_path = $xymon::params::cli_main_cfg_path, $main_cfg_tpl = $xymon::params::cli_main_cfg_tpl, $list_server = $xymon::params::list_server, + $plugin_sug_pkg_name = $xymon::params::plugin_sug_pkg_name, $plugin_download_url = $xymon::params::plugin_download_url, $plugin_pkg_name = $xymon::params::plugin_pkg_name, $plugin_pkg_source = $xymon::params::plugin_pkg_source, diff --git a/manifests/client/config.pp b/manifests/client/config.pp index b0bdb31..10fe8e6 100644 --- a/manifests/client/config.pp +++ b/manifests/client/config.pp @@ -19,13 +19,13 @@ class xymon::client::config { -> file { $xymon::client::service_path: ensure => present, - mode => 0754, + mode => '0754', content => template($xymon::client::service_tpl), notify => Service[$xymon::client::service_name], } # Client Configuration - file { "${xymon::client::main_cfg_path}": + file { $xymon::client::main_cfg_path: ensure => present, content => template($xymon::client::main_cfg_tpl), notify => Service[$xymon::client::service_name], diff --git a/manifests/client/install.pp b/manifests/client/install.pp index 60fef68..0605d73 100644 --- a/manifests/client/install.pp +++ b/manifests/client/install.pp @@ -46,6 +46,12 @@ class xymon::client::install { ensure => $xymon::client::plugin_pkg_ensure, provider => $xymon::client::plugin_pkg_provider, source => "${xymon::client::download_dir}/${xymon::client::plugin_pkg_name}", + require => Package['xymon-client'], + } + -> + # Suggests packages + package { $xymon::client::plugin_sug_pkg_name: + ensure => $xymon::client::plugin_pkg_ensure, } } # Private class: xymon::client::install diff --git a/manifests/params.pp b/manifests/params.pp index c56a027..1b2c374 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -32,6 +32,7 @@ class xymon::params { $plugin_pkg_source = 'puppet:///modules/xymon/client/hobbit-plugins_20141201_all_gardouille.deb' $plugin_pkg_ensure = 'present' $plugin_pkg_provider = 'dpkg' + $plugin_sug_pkg_name = [ 'dctrl-tools', 'libsort-naturally-perl', 'libyaml-tiny-perl', 'lsb-release', 'lsof', 'debsums', 'fping', 'liblist-moreutils-perl', 'libsysadm-install-perl', 'libtimedate-perl', 'dphys-config' ] }