2015-12-19 10:16:05 +00:00
|
|
|
# == Class: rsnapshot
|
|
|
|
#
|
|
|
|
# Manages rsnapshot.
|
|
|
|
#
|
|
|
|
# === Parameters
|
|
|
|
#
|
|
|
|
class rsnapshot (
|
2017-04-01 21:27:18 +00:00
|
|
|
$hosts = $rsnapshot::params::hosts,
|
|
|
|
$conf_d = $rsnapshot::params::conf_d,
|
|
|
|
$logpath = $rsnapshot::params::config_logpath,
|
|
|
|
$lockpath = $rsnapshot::params::config_lockpath,
|
|
|
|
$default_backup = $rsnapshot::params::config_default_backup,
|
|
|
|
$package_name = $rsnapshot::params::package_name,
|
|
|
|
$package_ensure = $rsnapshot::params::package_ensure,
|
|
|
|
$cron = $rsnapshot::params::cron,
|
|
|
|
$backup_scripts = $rsnapshot::params::backup_scripts,
|
|
|
|
$include = $rsnapshot::params::config_include,
|
|
|
|
$exclude = $rsnapshot::params::config_exclude,
|
|
|
|
$snapshot_root = $rsnapshot::params::config_snapshot_root,
|
|
|
|
$backup_levels = $rsnapshot::params::config_backup_levels,
|
|
|
|
$cron_service_name = $rsnapshot::params::cron_service_name,
|
|
|
|
$rsnapshot_prefix = $rsnapshot::params::config_rsnapshot_prefix,
|
|
|
|
$rsnapshot_prefix_use = $rsnapshot::params::config_rsnapshot_prefix_use,
|
|
|
|
$check_mk_job = $rsnapshot::params::config_check_mk_job,
|
2017-03-14 22:51:18 +00:00
|
|
|
|
2015-12-19 10:16:05 +00:00
|
|
|
) inherits rsnapshot::params {
|
2016-01-19 15:01:54 +00:00
|
|
|
|
|
|
|
$default_backup_scripts = $rsnapshot::params::backup_scripts + $backup_scripts
|
|
|
|
$default_exclude = $rsnapshot::params::config_exclude + $exclude
|
2015-12-19 10:16:05 +00:00
|
|
|
if $hosts {
|
2015-12-21 17:39:21 +00:00
|
|
|
class { '::rsnapshot::install': }->
|
2016-01-22 08:31:51 +00:00
|
|
|
class { '::rsnapshot::config': }~>
|
|
|
|
class { '::rsnapshot::service': }
|
2015-12-21 17:39:21 +00:00
|
|
|
contain '::rsnapshot::install'
|
|
|
|
contain '::rsnapshot::config'
|
2016-01-22 08:31:51 +00:00
|
|
|
contain '::rsnapshot::service'
|
2015-12-19 10:16:05 +00:00
|
|
|
}
|
|
|
|
}
|