mirror of
https://github.com/krislamo/puppet-rsnapshot
synced 2024-12-16 09:40:35 +00:00
Merge branch 'develop'
- restart cron service after config generation
This commit is contained in:
commit
638ec858b0
@ -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
|
||||
|
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