diff options
Diffstat (limited to 'templates/rdiff.conf.erb')
-rw-r--r-- | templates/rdiff.conf.erb | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/templates/rdiff.conf.erb b/templates/rdiff.conf.erb index 99bda4e..23c336f 100644 --- a/templates/rdiff.conf.erb +++ b/templates/rdiff.conf.erb @@ -30,25 +30,9 @@ type = local <% end -%> [dest] -<%- include Puppet::Util::Package - class VersionComparer; extend Puppet::Util::Package; end - - if VersionComparer.versioncmp(Puppet.version,'0.24.6') >= 0 - %w{type host directory user sshoptions}.each do |v| - if has_variable?(v) - -%> +<%- %w{type host directory user sshoptions}.each do |v| + if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%> <%= v + ' = ' + instance_variable_get("@#{v}").to_s %> - <%- - end - end - %> -<%- else -%> - <%- %w{type host directory user sshoptions}.each do |v| - if @scope.lookupvar(v) - -%> -<%= v + ' = ' + @scope.lookupvar(v) %> - <%- - end - end - %> -<%- end -%> +<%- + end +end -%> |