diff options
Diffstat (limited to 'templates/rdiff.conf.erb')
-rw-r--r-- | templates/rdiff.conf.erb | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/templates/rdiff.conf.erb b/templates/rdiff.conf.erb index f5548e4..0e19125 100644 --- a/templates/rdiff.conf.erb +++ b/templates/rdiff.conf.erb @@ -28,8 +28,25 @@ type = local <% end -%> [dest] -<% %w{type host directory user sshoptions}.each do |v| - if @scope.lookupvar(v) - -%><%= v + ' = ' + @scope.lookupvar(v) + "\n" %><% - end -end -%> +<%- 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) + -%> +<%= 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 -%> |