mirror of
https://github.com/krislamo/puppet-rsnapshot
synced 2024-11-10 00:00: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
|
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)
|
$use_lazy_deletes_num = bool2num($use_lazy_deletes)
|
||||||
}
|
}
|
||||||
|
|
||||||
file { $exclude_file:
|
if $include != '' {
|
||||||
ensure => 'file',
|
file { $include_file:
|
||||||
|
ensure => 'file',
|
||||||
|
content => template('rsnapshot/include.erb'),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $exclude != '' {
|
||||||
|
file { $exclude_file:
|
||||||
|
ensure => 'file',
|
||||||
|
content => template('rsnapshot/exclude.erb'),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
file { $config:
|
file { $config:
|
||||||
content => template('rsnapshot/rsnapshot.erb'),
|
content => template('rsnapshot/rsnapshot.erb'),
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "loomsen-rsnapshot",
|
"name": "loomsen-rsnapshot",
|
||||||
"version": "0.2.2",
|
"version": "0.3.0",
|
||||||
"author": "loomsen",
|
"author": "loomsen",
|
||||||
"summary": "Configures rsnapshot.",
|
"summary": "Configures rsnapshot.",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
@ -82,25 +82,19 @@ ssh_args <%= @ssh_args %>
|
|||||||
<% if @du_args != '' -%>
|
<% if @du_args != '' -%>
|
||||||
du_args <%= @du_args %>
|
du_args <%= @du_args %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if @one_fs != '' %>
|
<% if @one_fs != '' -%>
|
||||||
one_fs <%= @one_fs_num %>
|
one_fs <%= @one_fs_num %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if @include != '' %>
|
<% if @include != '' -%>
|
||||||
<% @include.each do |pattern| -%>
|
|
||||||
include <%= pattern %>
|
|
||||||
<% end -%>
|
|
||||||
<%end-%>
|
|
||||||
<% if @exclude != '' %>
|
|
||||||
<% @exclude.each do |pattern| -%>
|
|
||||||
exclude <%= pattern %>
|
|
||||||
<% end -%>
|
|
||||||
<%end-%>
|
|
||||||
<% if @include_file != '' -%>
|
<% if @include_file != '' -%>
|
||||||
include_file <%= @include_file %>
|
include_file <%= @include_file %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
<% end -%>
|
||||||
|
<% if @exclude != '' -%>
|
||||||
<% if @exclude_file != '' -%>
|
<% if @exclude_file != '' -%>
|
||||||
exclude_file <%= @exclude_file %>
|
exclude_file <%= @exclude_file %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
<% end -%>
|
||||||
<% if @link_dest != '' -%>
|
<% if @link_dest != '' -%>
|
||||||
link_dest <%= @link_dest_num %>
|
link_dest <%= @link_dest_num %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
Loading…
Reference in New Issue
Block a user