2015-12-19 10:16:05 +00:00
|
|
|
# == Class: rsnapshot
|
|
|
|
#
|
|
|
|
# Manages rsnapshot.
|
|
|
|
#
|
|
|
|
# === Parameters
|
|
|
|
#
|
|
|
|
class rsnapshot (
|
|
|
|
$hosts = $rsnapshot::params::hosts,
|
|
|
|
$conf_d = $rsnapshot::params::conf_d,
|
|
|
|
$logpath = $rsnapshot::params::config_logpath,
|
|
|
|
$lockpath = $rsnapshot::params::config_lockpath,
|
2015-12-19 21:49:34 +00:00
|
|
|
$default_backup = $rsnapshot::params::config_default_backup,
|
2015-12-21 10:43:50 +00:00
|
|
|
$package_name = $rsnapshot::params::package_name,
|
|
|
|
$package_ensure = $rsnapshot::params::package_ensure,
|
2015-12-22 13:55:21 +00:00
|
|
|
$cron = $rsnapshot::params::cron,
|
2016-01-19 15:01:54 +00:00
|
|
|
$backup_scripts = $rsnapshot::params::backup_scripts,
|
2016-01-20 09:27:29 +00:00
|
|
|
$include = $rsnapshot::params::config_include,
|
2016-01-19 15:01:54 +00:00
|
|
|
$exclude = $rsnapshot::params::config_exclude,
|
2016-01-19 16:23:40 +00:00
|
|
|
$snapshot_root = $rsnapshot::params::config_snapshot_root,
|
2016-01-20 09:27:29 +00:00
|
|
|
$backup_levels = $rsnapshot::params::config_backup_levels,
|
2016-01-22 08:31:51 +00:00
|
|
|
$cron_service_name = $rsnapshot::params::cron_service_name,
|
2017-02-27 10:58:18 +00:00
|
|
|
$rsnapshot_prefix = $rsnapshot::params::config_rsnapshot_prefix,
|
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|