From cb05e48d7ed052c2ddad5a0a20e0d253080675ae Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Wed, 11 Mar 2009 16:54:34 -0400 Subject: the default value for sshoptions is 'false' and this value ends up getting set into the rdiff config, so 'sshoptions = false' which results in the host attempting to connect to a hostname called 'false'. This change only includes it if the value is not 'false'. --- templates/rdiff.conf.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates/rdiff.conf.erb') diff --git a/templates/rdiff.conf.erb b/templates/rdiff.conf.erb index 0e19125..a28917a 100644 --- a/templates/rdiff.conf.erb +++ b/templates/rdiff.conf.erb @@ -33,7 +33,7 @@ type = local if VersionComparer.versioncmp(Puppet.version,'0.24.6') >= 0 %w{type host directory user sshoptions}.each do |v| - if has_variable?(v) + if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%> <%= v + ' = ' + instance_variable_get("@#{v}").to_s %> <%- -- cgit v1.2.3 From 04f10d333b4978a2ce71782c3d94fc2a08f33573 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 14 Apr 2009 15:56:53 -0400 Subject: remove the versioncmp function in the rdiff handler. This was a nice attempt to try and support older puppets, but this functionality has not stabilized yet, 0.24.8 broke versioncmp and there looks like a new way coming. Its easier to be mean. --- templates/rdiff.conf.erb | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) (limited to 'templates/rdiff.conf.erb') diff --git a/templates/rdiff.conf.erb b/templates/rdiff.conf.erb index a28917a..a41e969 100644 --- a/templates/rdiff.conf.erb +++ b/templates/rdiff.conf.erb @@ -28,25 +28,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) and instance_variable_get("@#{v}").to_s != "false" - -%> +<%- %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 -%> -- cgit v1.2.3