From 6338f977813fd231d7aea926f65b3fc86428bbbe Mon Sep 17 00:00:00 2001 From: cruisibesarescondev Date: Wed, 12 Mar 2014 13:02:43 -0400 Subject: [PATCH] Make logic explicit in template. I see this warning when I render this template: modules/ssh/templates/sshd_config.erb:3: warning: string literal in condition Im not sure if this effects all versions of ruby or what. I think that this was your intension. Let me know if this isn't want you wanted here. On: ubuntu ruby 1.9.3p0 puppet 3.4.3 --- templates/sshd_config.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/sshd_config.erb b/templates/sshd_config.erb index eab824840..5043e66d2 100644 --- a/templates/sshd_config.erb +++ b/templates/sshd_config.erb @@ -1,6 +1,6 @@ # File is managed by Puppet -<%- scope.lookupvar('ssh::server::merged_options').sort_by{ |sk, sv| sk.to_s.downcase.include? "match" ? sk.to_s : '' }.each do |k, v| -%> +<%- scope.lookupvar('ssh::server::merged_options').sort_by{ |sk, sv| (sk.to_s.downcase.include? "match" )? sk.to_s : '' }.each do |k, v| -%> <%- if v.is_a?(Hash) -%> <%= k %> <%- v.sort.each do |key, value| -%>