diff options
author | Antoine Beaupre <anarcat@koumbit.org> | 2008-12-08 16:24:43 -0500 |
---|---|---|
committer | Antoine Beaupre <anarcat@koumbit.org> | 2008-12-08 16:24:43 -0500 |
commit | d61e1c60fabc102103b0fa79450ed6a5ca0da0ca (patch) | |
tree | c34c29c49ba15a2fc56d87343c38984d02444f7a /templates | |
parent | f51344acc8a55fe2dd0b9b17331e913d6ef723d0 (diff) | |
parent | 72493d7caa635eb8ef210bc0a402b5579f85d98c (diff) | |
download | puppet-backupninja-d61e1c60fabc102103b0fa79450ed6a5ca0da0ca.tar.gz puppet-backupninja-d61e1c60fabc102103b0fa79450ed6a5ca0da0ca.tar.bz2 |
Merge commit 'micah/master'
Conflicts:
templates/rdiff.conf.erb
Diffstat (limited to 'templates')
-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 -%> |