mirror of
https://github.com/krislamo/puppet-rsnapshot
synced 2024-11-10 00:00: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,
|
$exclude = $rsnapshot::params::config_exclude,
|
||||||
$snapshot_root = $rsnapshot::params::config_snapshot_root,
|
$snapshot_root = $rsnapshot::params::config_snapshot_root,
|
||||||
$backup_levels = $rsnapshot::params::config_backup_levels,
|
$backup_levels = $rsnapshot::params::config_backup_levels,
|
||||||
|
$cron_service_name = $rsnapshot::params::cron_service_name,
|
||||||
) inherits rsnapshot::params {
|
) inherits rsnapshot::params {
|
||||||
|
|
||||||
$default_backup_scripts = $rsnapshot::params::backup_scripts + $backup_scripts
|
$default_backup_scripts = $rsnapshot::params::backup_scripts + $backup_scripts
|
||||||
$default_exclude = $rsnapshot::params::config_exclude + $exclude
|
$default_exclude = $rsnapshot::params::config_exclude + $exclude
|
||||||
if $hosts {
|
if $hosts {
|
||||||
class { '::rsnapshot::install': }->
|
class { '::rsnapshot::install': }->
|
||||||
class { '::rsnapshot::config': }
|
class { '::rsnapshot::config': }~>
|
||||||
|
class { '::rsnapshot::service': }
|
||||||
contain '::rsnapshot::install'
|
contain '::rsnapshot::install'
|
||||||
contain '::rsnapshot::config'
|
contain '::rsnapshot::config'
|
||||||
|
contain '::rsnapshot::service'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ class rsnapshot::params {
|
|||||||
$config_backup_user = 'root'
|
$config_backup_user = 'root'
|
||||||
$package_name = 'rsnapshot'
|
$package_name = 'rsnapshot'
|
||||||
$package_ensure = 'present'
|
$package_ensure = 'present'
|
||||||
|
$cron_service_name = 'crond'
|
||||||
$cron_dir = '/etc/cron.d'
|
$cron_dir = '/etc/cron.d'
|
||||||
$config_backup_levels = [ 'daily', 'weekly', 'monthly' ]
|
$config_backup_levels = [ 'daily', 'weekly', 'monthly' ]
|
||||||
$config_backup_defaults = true
|
$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