xymon::client::install : Create download directory
This commit is contained in:
parent
9bf5128782
commit
1cab78e5d6
32
manifests/client.pp
Normal file
32
manifests/client.pp
Normal file
@ -0,0 +1,32 @@
|
||||
# == Class: xymon::client
|
||||
#
|
||||
# Manage installation and configuration of Xymon client.
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
#
|
||||
# === Variables
|
||||
#
|
||||
#
|
||||
# === Examples
|
||||
#
|
||||
# class { 'xymon::client':
|
||||
# }
|
||||
#
|
||||
# === Authors
|
||||
#
|
||||
# Gardouille <gardouille@gmail.com>
|
||||
#
|
||||
# === Copyright
|
||||
#
|
||||
# WTFPL <http://wtfpl.org/>
|
||||
#
|
||||
class xymon::client (
|
||||
$download_dir = $xymon::params::download_dir,
|
||||
$cli_new_version = $xymon::params::cli_new_version,
|
||||
$cli_old_version = $xymon::params::cli_old_version,
|
||||
) inherits xymon::params {
|
||||
|
||||
include '::xymon::client::install'
|
||||
|
||||
} # Public class: xymon::client
|
20
manifests/client/install.pp
Normal file
20
manifests/client/install.pp
Normal file
@ -0,0 +1,20 @@
|
||||
# == Class: xymon::client::install
|
||||
#
|
||||
# Install Xymon client
|
||||
#
|
||||
class xymon::client::install {
|
||||
|
||||
Exec {
|
||||
path => [ '/bin', '/sbin', '/usr/bin', '/usr/sbin' ],
|
||||
logoutput => 'on_failure',
|
||||
}
|
||||
|
||||
exec { 'Create download directory for Xymon client package':
|
||||
command => "mkdir -p -- ${xymon::client::download_dir}",
|
||||
creates => $xymon::client::download_dir,
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} # Private class: xymon::client::install
|
20
manifests/params.pp
Normal file
20
manifests/params.pp
Normal file
@ -0,0 +1,20 @@
|
||||
# == Class: xymon::params
|
||||
#
|
||||
class xymon::params {
|
||||
case $::osfamily {
|
||||
'Debian': {
|
||||
|
||||
# Client
|
||||
$download_dir = '/opt/xymon/packages'
|
||||
$cli_new_version = '4.3.18'
|
||||
$cli_old_version = '4.3.17'
|
||||
|
||||
}
|
||||
default: {
|
||||
fail('This Puppet module has been tested only on Debian OS family.')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
} # Private class: xymon::params
|
Loading…
Reference in New Issue
Block a user