mirror of
https://github.com/krislamo/puppet-rsnapshot
synced 2024-12-16 09:40:35 +00:00
Add option to avoid managing cron
This commit is contained in:
parent
450474165f
commit
d2cf15621b
@ -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,
|
||||||
|
@ -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
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
# == Class: rsnapshot::service
|
# == Class: rsnapshot::service
|
||||||
#
|
#
|
||||||
# Reloads cron
|
# Reloads cron
|
||||||
class rsnapshot::service {
|
class rsnapshot::service (
|
||||||
|
$manage_cron = $rsnapshot::manage_cron
|
||||||
|
) {
|
||||||
|
|
||||||
|
if $manage_cron {
|
||||||
service { $rsnapshot::cron_service_name:
|
service { $rsnapshot::cron_service_name:
|
||||||
ensure => running,
|
ensure => running,
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user