diff --git a/manifests/init.pp b/manifests/init.pp index 5224acc..031b7a6 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -20,6 +20,7 @@ class rsnapshot ( $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, diff --git a/manifests/params.pp b/manifests/params.pp index aa483a3..12e54c9 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -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 diff --git a/manifests/service.pp b/manifests/service.pp index 9769161..6aed08f 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -1,10 +1,13 @@ # == Class: rsnapshot::service # -# Reloads cron -class rsnapshot::service { - service { $rsnapshot::cron_service_name: - ensure => running, +# Reloads cron +class rsnapshot::service ( + $manage_cron = $rsnapshot::manage_cron +) { + + if $manage_cron { + service { $rsnapshot::cron_service_name: + ensure => running, + } } - } -