mirror of
https://github.com/krislamo/puppet-rsnapshot
synced 2024-11-10 00:00:35 +00:00
restart cron service after config change
This commit is contained in:
parent
7318f9b2dc
commit
d71239645f
@ -18,15 +18,18 @@ class rsnapshot (
|
||||
$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,
|
||||
) inherits rsnapshot::params {
|
||||
|
||||
$default_backup_scripts = $rsnapshot::params::backup_scripts + $backup_scripts
|
||||
$default_exclude = $rsnapshot::params::config_exclude + $exclude
|
||||
if $hosts {
|
||||
class { '::rsnapshot::install': }->
|
||||
class { '::rsnapshot::config': }
|
||||
class { '::rsnapshot::config': }~>
|
||||
class { '::rsnapshot::service': }
|
||||
contain '::rsnapshot::install'
|
||||
contain '::rsnapshot::config'
|
||||
contain '::rsnapshot::service'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@ class rsnapshot::params {
|
||||
$config_backup_user = 'root'
|
||||
$package_name = 'rsnapshot'
|
||||
$package_ensure = 'present'
|
||||
$cron_service_name = 'crond'
|
||||
$cron_dir = '/etc/cron.d'
|
||||
$config_backup_levels = [ 'daily', 'weekly', 'monthly' ]
|
||||
$config_backup_defaults = true
|
||||
@ -32,7 +33,7 @@ class rsnapshot::params {
|
||||
$config_logpath = '/var/log/rsnapshot'
|
||||
$config_logfile = '/var/log/rsnapshot.log' # unused, we are logging to $logpath/$host.log
|
||||
$config_lockpath = '/var/run/rsnapshot'
|
||||
$config_snapshot_root = '/backup/'
|
||||
$config_snapshot_root = '/backup'
|
||||
$config_no_create_root = undef # bool, true or false
|
||||
$config_verbose = '2'
|
||||
$config_loglevel = '4'
|
||||
|
10
manifests/service.pp
Normal file
10
manifests/service.pp
Normal file
@ -0,0 +1,10 @@
|
||||
# == Class: rsnapshot::service
|
||||
#
|
||||
# Reloads cron
|
||||
class rsnapshot::service {
|
||||
service { $rsnapshot::cron_service_name:
|
||||
ensure => running,
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user