1
0
mirror of https://github.com/krislamo/puppet-rsnapshot synced 2024-11-10 00:00:35 +00:00

Add option to avoid managing cron

This commit is contained in:
Rune Juhl Jacobsen 2017-04-06 09:20:32 +02:00
parent 450474165f
commit d2cf15621b
3 changed files with 11 additions and 6 deletions

View File

@ -20,6 +20,7 @@ class rsnapshot (
$backup_levels = $rsnapshot::params::config_backup_levels, $backup_levels = $rsnapshot::params::config_backup_levels,
$backup_user = $rsnapshot::params::config_backup_user, $backup_user = $rsnapshot::params::config_backup_user,
$cron_service_name = $rsnapshot::params::cron_service_name, $cron_service_name = $rsnapshot::params::cron_service_name,
$manage_cron = $rsnapshot::params::manage_cron,
$cronfile_prefix = $rsnapshot::params::config_cronfile_prefix, $cronfile_prefix = $rsnapshot::params::config_cronfile_prefix,
$cronfile_prefix_use = $rsnapshot::params::config_cronfile_prefix_use, $cronfile_prefix_use = $rsnapshot::params::config_cronfile_prefix_use,
$check_mk_job = $rsnapshot::params::config_check_mk_job, $check_mk_job = $rsnapshot::params::config_check_mk_job,

View File

@ -12,6 +12,7 @@ class rsnapshot::params {
'Debian' => 'cron', 'Debian' => 'cron',
default => '', default => '',
} }
$manage_cron = true
$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

View File

@ -1,10 +1,13 @@
# == Class: rsnapshot::service # == Class: rsnapshot::service
# #
# Reloads cron # Reloads cron
class rsnapshot::service { class rsnapshot::service (
service { $rsnapshot::cron_service_name: $manage_cron = $rsnapshot::manage_cron
ensure => running, ) {
if $manage_cron {
service { $rsnapshot::cron_service_name:
ensure => running,
}
} }
} }