diff options
author | Micah Anderson <micah@riseup.net> | 2009-01-03 18:13:27 -0500 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2009-01-03 18:13:27 -0500 |
commit | d7e2830475b530f00567f77628d58e9e27f3a0b8 (patch) | |
tree | d6877f1772cf472d3a6781395a87fae359af41bb | |
parent | 132bae5004456dc9fb146b35b1c6b29573fd13b6 (diff) | |
parent | 72493d7caa635eb8ef210bc0a402b5579f85d98c (diff) | |
download | puppet-backupninja-d7e2830475b530f00567f77628d58e9e27f3a0b8.tar.gz puppet-backupninja-d7e2830475b530f00567f77628d58e9e27f3a0b8.tar.bz2 |
Merge branch 'master' of gitosis@labs.riseup.net:module_backupninja
-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 5e319a2..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 has_variable?(v) - -%><%= v + ' = ' + get_instance_var("@#{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 -%> |