1
0
mirror of https://github.com/krislamo/puppet-rsnapshot synced 2024-12-16 17:50:34 +00:00

Merge pull request #6 from monotek/check_mk_job

added check_mk mk-job support
This commit is contained in:
Norbert Varzariu 2017-03-13 16:54:00 +01:00 committed by GitHub
commit c5de50bd71
3 changed files with 5 additions and 3 deletions

View File

@ -19,6 +19,8 @@ class rsnapshot (
$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, $cron_service_name = $rsnapshot::params::cron_service_name,
$check_mk_job = $rsnapshot::params::config_check_mk_job,
) inherits rsnapshot::params { ) inherits rsnapshot::params {
$default_backup_scripts = $rsnapshot::params::backup_scripts + $backup_scripts $default_backup_scripts = $rsnapshot::params::backup_scripts + $backup_scripts
@ -32,4 +34,3 @@ class rsnapshot (
contain '::rsnapshot::service' contain '::rsnapshot::service'
} }
} }

View File

@ -16,6 +16,7 @@ class rsnapshot::params {
$config_backup_levels = [ 'daily', 'weekly', 'monthly' ] $config_backup_levels = [ 'daily', 'weekly', 'monthly' ]
$config_backup_defaults = true $config_backup_defaults = true
$config_version = '1.2' $config_version = '1.2'
$config_check_mk_job = false
$config_cmd_cp = '/bin/cp' $config_cmd_cp = '/bin/cp'
$config_cmd_rm = '/bin/rm' $config_cmd_rm = '/bin/rm'
$config_cmd_rsync = '/usr/bin/rsync' $config_cmd_rsync = '/usr/bin/rsync'

View File

@ -1 +1 @@
<%= @minute %> <%= @hour %> <%= @monthday %> <%= @month %> <%= @weekday %> root /usr/bin/rsnapshot -c <%= @config %> <%= @level %> <%= @minute %> <%= @hour %> <%= @monthday %> <%= @month %> <%= @weekday %> root<% if scope['rsnapshot::check_mk_job'] == true -%> mk-job rsnapshot_<%= @host %>_<%= @level %><% end -%> /usr/bin/rsnapshot -c <%= @config %> <%= @level %>