mirror of
https://github.com/krislamo/puppet-rsnapshot
synced 2024-11-10 00:00:35 +00:00
Merge branch 'master' into develop
This commit is contained in:
commit
3089c49a66
@ -12,8 +12,8 @@ class rsnapshot::config (
|
||||
$conf_d = pick($rsnapshot::conf_d, $rsnapshot::params::conf_d, '/etc/rsnapshot')
|
||||
$snapshot_root = pick($hosts['snapshot_root'], $rsnapshot::snapshot_root, '/backup')
|
||||
$logpath = pick($rsnapshot::logpath, $rsnapshot::params::config_logpath)
|
||||
$cronfile_prefix_use = pick($rsnapshot::cronfile_prefix_use, $rsnapshot::params::cronfile_prefix_use, false)
|
||||
$cronfile_prefix = pick($rsnapshot::cronfile_prefix, $rsnapshot::params::cronfile_prefix, '')
|
||||
$cronfile_prefix_use = pick($rsnapshot::cronfile_prefix_use, $rsnapshot::params::config_cronfile_prefix_use, false)
|
||||
$cronfile_prefix = pick($rsnapshot::cronfile_prefix, $rsnapshot::params::config_cronfile_prefix, '')
|
||||
# make sure lock path and conf path exist
|
||||
file { $conf_d:
|
||||
ensure => 'directory',
|
||||
@ -82,7 +82,7 @@ class rsnapshot::config (
|
||||
$rsync_numtries = pick_undef($hash['rsync_numtries'], $rsnapshot::params::config_rsync_numtries)
|
||||
#$backup_scripts = pick_undef($hash['backup_scripts'], $rsnapshot::params::config_backup_scripts)
|
||||
|
||||
$snapshot_dir = "${config_snapshot_root}/${host}"
|
||||
$snapshot_dir = "${snapshot_root}/${host}"
|
||||
$config = "${conf_d}/${host}.rsnapshot.conf"
|
||||
$lockfile = "${lockpath}/${host}.pid"
|
||||
$logfile = "${logpath}/${host}.log"
|
||||
|
@ -18,7 +18,9 @@ class rsnapshot (
|
||||
$exclude = $rsnapshot::params::config_exclude,
|
||||
$snapshot_root = $rsnapshot::params::config_snapshot_root,
|
||||
$backup_levels = $rsnapshot::params::config_backup_levels,
|
||||
$backup_user = $rsnapshot::params::config_backup_user,
|
||||
$cron_service_name = $rsnapshot::params::cron_service_name,
|
||||
$manage_cron = $rsnapshot::params::manage_cron,
|
||||
$cronfile_prefix = $rsnapshot::params::config_cronfile_prefix,
|
||||
$cronfile_prefix_use = $rsnapshot::params::config_cronfile_prefix_use,
|
||||
$check_mk_job = $rsnapshot::params::config_check_mk_job,
|
||||
|
@ -12,6 +12,7 @@ class rsnapshot::params {
|
||||
'Debian' => 'cron',
|
||||
default => '',
|
||||
}
|
||||
$manage_cron = true
|
||||
$cron_dir = '/etc/cron.d'
|
||||
$config_backup_levels = [ 'daily', 'weekly', 'monthly' ]
|
||||
$config_backup_defaults = true
|
||||
|
@ -1,10 +1,13 @@
|
||||
# == Class: rsnapshot::service
|
||||
#
|
||||
# Reloads cron
|
||||
class rsnapshot::service {
|
||||
class rsnapshot::service (
|
||||
$manage_cron = $rsnapshot::manage_cron
|
||||
) {
|
||||
|
||||
if $manage_cron {
|
||||
service { $rsnapshot::cron_service_name:
|
||||
ensure => running,
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user