mirror of
https://github.com/krislamo/puppet-rsnapshot
synced 2024-12-16 01:30:35 +00:00
only create in-/exclude file if in-/excludes are given and bump version
This commit is contained in:
parent
4ead2ebeff
commit
25a282cf4f
3
TODO
3
TODO
@ -1,3 +1,4 @@
|
||||
validate for puppet 3 => impossible, misses the .each function
|
||||
|
||||
Fix Documentation
|
||||
|
||||
only create exclude and/or include files if actually exclude/include are given
|
||||
|
@ -108,9 +108,20 @@ class rsnapshot::config (
|
||||
$use_lazy_deletes_num = bool2num($use_lazy_deletes)
|
||||
}
|
||||
|
||||
file { $exclude_file:
|
||||
ensure => 'file',
|
||||
if $include != '' {
|
||||
file { $include_file:
|
||||
ensure => 'file',
|
||||
content => template('rsnapshot/include.erb'),
|
||||
}
|
||||
}
|
||||
|
||||
if $exclude != '' {
|
||||
file { $exclude_file:
|
||||
ensure => 'file',
|
||||
content => template('rsnapshot/exclude.erb'),
|
||||
}
|
||||
}
|
||||
|
||||
file { $config:
|
||||
content => template('rsnapshot/rsnapshot.erb'),
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "loomsen-rsnapshot",
|
||||
"version": "0.2.2",
|
||||
"version": "0.3.0",
|
||||
"author": "loomsen",
|
||||
"summary": "Configures rsnapshot.",
|
||||
"license": "Apache-2.0",
|
||||
|
@ -82,25 +82,19 @@ ssh_args <%= @ssh_args %>
|
||||
<% if @du_args != '' -%>
|
||||
du_args <%= @du_args %>
|
||||
<% end -%>
|
||||
<% if @one_fs != '' %>
|
||||
<% if @one_fs != '' -%>
|
||||
one_fs <%= @one_fs_num %>
|
||||
<% end -%>
|
||||
<% if @include != '' %>
|
||||
<% @include.each do |pattern| -%>
|
||||
include <%= pattern %>
|
||||
<% end -%>
|
||||
<%end-%>
|
||||
<% if @exclude != '' %>
|
||||
<% @exclude.each do |pattern| -%>
|
||||
exclude <%= pattern %>
|
||||
<% end -%>
|
||||
<%end-%>
|
||||
<% if @include != '' -%>
|
||||
<% if @include_file != '' -%>
|
||||
include_file <%= @include_file %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% if @exclude != '' -%>
|
||||
<% if @exclude_file != '' -%>
|
||||
exclude_file <%= @exclude_file %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% if @link_dest != '' -%>
|
||||
link_dest <%= @link_dest_num %>
|
||||
<% end -%>
|
||||
|
Loading…
Reference in New Issue
Block a user