xymon::client::install : Install the {xymon,hobbit}-plugins via a source
deb or a download URL.
This commit is contained in:
parent
f30b3d7bb7
commit
90388cf012
BIN
files/client/hobbit-plugins_20141201_all.deb
Normal file
BIN
files/client/hobbit-plugins_20141201_all.deb
Normal file
Binary file not shown.
@ -38,6 +38,11 @@ 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_download_url = $xymon::params::plugin_download_url,
|
||||
$plugin_pkg_name = $xymon::params::plugin_pkg_name,
|
||||
$plugin_pkg_source = $xymon::params::plugin_pkg_source,
|
||||
$plugin_pkg_ensure = $xymon::params::plugin_pkg_ensure,
|
||||
$plugin_pkg_provider = $xymon::params::plugin_pkg_provider,
|
||||
) inherits xymon::params {
|
||||
|
||||
validate_array($list_server)
|
||||
|
@ -24,5 +24,28 @@ class xymon::client::install {
|
||||
source => "${xymon::client::download_dir}/${xymon::client::preconfig::pkg_name}",
|
||||
}
|
||||
|
||||
## Plugin package
|
||||
# Get the Xymon-plugin package
|
||||
if $xymon::client::plugin_download_url == undef {
|
||||
file { "${xymon::client::download_dir}/${xymon::client::plugin_pkg_name}":
|
||||
ensure => $xymon::client::plugin_pkg_ensure,
|
||||
source => $xymon::client::plugin_pkg_source,
|
||||
before => Package[$xymon::client::plugin_pkg_name],
|
||||
}
|
||||
} else {
|
||||
# Download the plugin package
|
||||
exec { 'Download Xymon plugin package':
|
||||
command => "wget ${xymon::client::plugin_download_url} -O ${xymon::client::plugin_pkg_name}",
|
||||
cwd => $xymon::client::download_dir,
|
||||
creates => "${xymon::client::download_dir}/${xymon::client::plugin_pkg_name}",
|
||||
before => Package[$xymon::client::plugin_pkg_name],
|
||||
}
|
||||
}
|
||||
# Install the package
|
||||
package { $xymon::client::plugin_pkg_name:
|
||||
ensure => $xymon::client::plugin_pkg_ensure,
|
||||
provider => $xymon::client::plugin_pkg_provider,
|
||||
source => "${xymon::client::download_dir}/${xymon::client::plugin_pkg_name}",
|
||||
}
|
||||
|
||||
} # Private class: xymon::client::install
|
||||
|
@ -25,6 +25,15 @@ class xymon::params {
|
||||
$cli_main_cfg_tpl = 'xymon/client/xymonclient.cfg.erb'
|
||||
$list_server = [ '127.0.0.1' ]
|
||||
|
||||
## Plugin
|
||||
# Package
|
||||
$plugin_download_url = undef
|
||||
$plugin_pkg_name = 'hobbit-plugins'
|
||||
$plugin_pkg_source = 'puppet:///modules/xymon/client/hobbit-plugins_20141201_all.deb'
|
||||
$plugin_pkg_ensure = 'present'
|
||||
$plugin_pkg_provider = 'dpkg'
|
||||
|
||||
|
||||
}
|
||||
default: {
|
||||
fail('This Puppet module has been tested only on Debian OS family.')
|
||||
|
Loading…
Reference in New Issue
Block a user