mirror of
https://github.com/krislamo/puppet-rsnapshot
synced 2024-12-16 09:40:35 +00:00
quick fixes
This commit is contained in:
parent
8f7da1a1ee
commit
d4cd5282f7
@ -12,6 +12,7 @@ class rsnapshot::config (
|
|||||||
$conf_d = pick($rsnapshot::conf_d, $rsnapshot::params::conf_d, '/etc/rsnapshot')
|
$conf_d = pick($rsnapshot::conf_d, $rsnapshot::params::conf_d, '/etc/rsnapshot')
|
||||||
$snapshot_root = pick($hosts['snapshot_root'], $rsnapshot::snapshot_root, '/backup')
|
$snapshot_root = pick($hosts['snapshot_root'], $rsnapshot::snapshot_root, '/backup')
|
||||||
$default_cron = assert_empty_hash($::rsnapshot::cron)
|
$default_cron = assert_empty_hash($::rsnapshot::cron)
|
||||||
|
$logpath = pick($rsnapshot::logpath, $rsnapshot::params::config_logpath)
|
||||||
# make sure lock path and conf path exist
|
# make sure lock path and conf path exist
|
||||||
file { $conf_d:
|
file { $conf_d:
|
||||||
ensure => 'directory',
|
ensure => 'directory',
|
||||||
@ -25,6 +26,10 @@ class rsnapshot::config (
|
|||||||
file { $snapshot_root:
|
file { $snapshot_root:
|
||||||
ensure => 'directory',
|
ensure => 'directory',
|
||||||
}
|
}
|
||||||
|
file { $logpath:
|
||||||
|
ensure => directory,
|
||||||
|
}
|
||||||
|
|
||||||
# custom function, if only a hostname is given as a param, this is an empty hash
|
# custom function, if only a hostname is given as a param, this is an empty hash
|
||||||
# the next loop would break as puppet does not allow to reassign variables
|
# the next loop would break as puppet does not allow to reassign variables
|
||||||
# the function checks $hosts for elements like:
|
# the function checks $hosts for elements like:
|
||||||
@ -56,7 +61,6 @@ class rsnapshot::config (
|
|||||||
$linux_lvm_vgpath = pick_undef($hash['linux_lvm_vgpath'], $rsnapshot::params::config_linux_lvm_vgpath)
|
$linux_lvm_vgpath = pick_undef($hash['linux_lvm_vgpath'], $rsnapshot::params::config_linux_lvm_vgpath)
|
||||||
$linux_lvm_mountpath = pick_undef($hash['linux_lvm_mountpath'], $rsnapshot::params::config_linux_lvm_mountpath)
|
$linux_lvm_mountpath = pick_undef($hash['linux_lvm_mountpath'], $rsnapshot::params::config_linux_lvm_mountpath)
|
||||||
$no_create_root = pick_undef($hash['no_create_root'], $rsnapshot::params::config_no_create_root)
|
$no_create_root = pick_undef($hash['no_create_root'], $rsnapshot::params::config_no_create_root)
|
||||||
$logpath = pick($hash['logpath'], $rsnapshot::logpath, $rsnapshot::params::config_logpath)
|
|
||||||
$verbose = pick($hash['verbose'], $rsnapshot::params::config_verbose)
|
$verbose = pick($hash['verbose'], $rsnapshot::params::config_verbose)
|
||||||
$loglevel = pick($hash['loglevel'], $rsnapshot::params::config_loglevel)
|
$loglevel = pick($hash['loglevel'], $rsnapshot::params::config_loglevel)
|
||||||
$stop_on_stale_lockfile = pick_undef($hash['stop_on_stale_lockfile'], $rsnapshot::params::config_stop_on_stale_lockfile)
|
$stop_on_stale_lockfile = pick_undef($hash['stop_on_stale_lockfile'], $rsnapshot::params::config_stop_on_stale_lockfile)
|
||||||
|
@ -85,12 +85,12 @@ du_args <%= @du_args %>
|
|||||||
<% if @one_fs != '' -%>
|
<% if @one_fs != '' -%>
|
||||||
one_fs <%= @one_fs_num %>
|
one_fs <%= @one_fs_num %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if @include != '' -%>
|
<% if not @real_include.empty? -%>
|
||||||
<% if @include_file != '' -%>
|
<% if @include_file != '' -%>
|
||||||
include_file <%= @include_file %>
|
include_file <%= @include_file %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if @exclude != '' -%>
|
<% if not @real_exclude.empty? -%>
|
||||||
<% if @exclude_file != '' -%>
|
<% if @exclude_file != '' -%>
|
||||||
exclude_file <%= @exclude_file %>
|
exclude_file <%= @exclude_file %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
Loading…
Reference in New Issue
Block a user