xymon::client::install : Install the Xymon client package.

This commit is contained in:
gardouille 2015-02-11 10:34:51 +01:00
parent bc6540bf3e
commit c09b1ece7e
3 changed files with 23 additions and 10 deletions

View File

@ -22,10 +22,12 @@
# WTFPL <http://wtfpl.org/> # WTFPL <http://wtfpl.org/>
# #
class xymon::client ( class xymon::client (
$download_dir = $xymon::params::download_dir, $download_dir = $xymon::params::cli_download_dir,
$download_url = $xymon::params::download_url, $download_url = $xymon::params::cli_download_url,
$new_version = $xymon::params::cli_new_version, $new_version = $xymon::params::cli_new_version,
$package_name = $xymon::params::package_name, $package_name = $xymon::params::cli_package_name,
$pkg_ensure = $xymon::params::cli_pkg_ensure,
$pkg_provider = $xymon::params::cli_pkg_provider,
) inherits xymon::params { ) inherits xymon::params {
include '::xymon::client::preconfig' include '::xymon::client::preconfig'

View File

@ -15,11 +15,19 @@ class xymon::client::install {
} }
-> ->
## Package ## Package
# Download the latest Xymon package # Download the latest Xymon client package
exec { 'Download Xymon Client': exec { 'Download Xymon Client':
command => "wget ${xymon::client::preconfig::dl_url}/${xymon::client::preconfig::pkg_name} -O ${xymon::client::preconfig::pkg_name}", command => "wget ${xymon::client::preconfig::dl_url}/${xymon::client::preconfig::pkg_name} -O ${xymon::client::preconfig::pkg_name}",
cwd => "${xymon::client::download_dir}", cwd => "${xymon::client::download_dir}",
creates => "${xymon::client::download_dir}/${xymon::client::preconfig::pkg_name}", creates => "${xymon::client::download_dir}/${xymon::client::preconfig::pkg_name}",
}
->
# Install Xymon client package
package { 'xymon-client':
ensure => "${xymon::client::pkg_ensure}",
provider => "${xymon::client::pkg_provider}",
source => "${xymon::client::download_dir}/${xymon::client::preconfig::pkg_name}",
} }
} # Private class: xymon::client::install } # Private class: xymon::client::install

View File

@ -5,11 +5,14 @@ class xymon::params {
'Debian': { 'Debian': {
# Client # Client
$download_dir = '/opt/xymon/packages' $cli_download_dir = '/opt/xymon/packages'
$cli_download_url = undef
$cli_new_version = '4.3.17' $cli_new_version = '4.3.17'
$package_name = undef $cli_package_name = undef
$download_url = undef $cli_pkg_ensure = 'present'
$cli_pkg_provider = 'dpkg'
} }
default: { default: {