xymon::client::install : Install the Xymon client package.
This commit is contained in:
parent
bc6540bf3e
commit
c09b1ece7e
@ -22,10 +22,12 @@
|
||||
# WTFPL <http://wtfpl.org/>
|
||||
#
|
||||
class xymon::client (
|
||||
$download_dir = $xymon::params::download_dir,
|
||||
$download_url = $xymon::params::download_url,
|
||||
$download_dir = $xymon::params::cli_download_dir,
|
||||
$download_url = $xymon::params::cli_download_url,
|
||||
$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 {
|
||||
|
||||
include '::xymon::client::preconfig'
|
||||
|
@ -15,11 +15,19 @@ class xymon::client::install {
|
||||
}
|
||||
->
|
||||
## Package
|
||||
# Download the latest Xymon package
|
||||
# Download the latest Xymon client package
|
||||
exec { 'Download Xymon Client':
|
||||
command => "wget ${xymon::client::preconfig::dl_url}/${xymon::client::preconfig::pkg_name} -O ${xymon::client::preconfig::pkg_name}",
|
||||
cwd => "${xymon::client::download_dir}",
|
||||
creates => "${xymon::client::download_dir}/${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}",
|
||||
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
|
||||
|
@ -5,11 +5,14 @@ class xymon::params {
|
||||
'Debian': {
|
||||
|
||||
# Client
|
||||
$download_dir = '/opt/xymon/packages'
|
||||
$cli_download_dir = '/opt/xymon/packages'
|
||||
$cli_download_url = undef
|
||||
$cli_new_version = '4.3.17'
|
||||
|
||||
$package_name = undef
|
||||
$download_url = undef
|
||||
$cli_package_name = undef
|
||||
$cli_pkg_ensure = 'present'
|
||||
$cli_pkg_provider = 'dpkg'
|
||||
|
||||
|
||||
}
|
||||
default: {
|
||||
|
Loading…
Reference in New Issue
Block a user