Hello everyone, I''m new to puppet & ruby - some experience with Python. I''m working at getting some templates coded with hashes & conditionals, and using a contrived example here to get myself started: This works as I expect in ruby code: pets = {"snakes"=>["python", "boa constrictor"], "kitties"=>["tomcat", "pussycat"], "puppies"=>["akitas", "collies", "german shepherds"]} for pet in pets.keys puts pet for pt in pets[pet] if pet == ''snakes'' then puts "#{pt} is in the #{pet} family" end end end So, that''s the output I want in my ERB template, which is created thusly: <% for pet in pets.keys %> <%= pet %> <% for pt in pets[pet] %> <% if pet == ''snakes'' then %> <%= "#{pt} is in the #{pet} family" %> <% end %> <% end %> <% end %> However, no matter how I fiddle the syntax, I always get: err: Could not retrieve catalog from remote server: wrong header line format What am I doing wrong? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Well, harrumph. Scratchin'' mah head - totally baffled, perplexed. I went to eat and gave it a break. Came back and re-verified syntax checks. Syntax OK - just as before. Ran puppet validate for the first time with no errors. Then, for kicks and giggles, I again to apply the config to the node. Shazzam - it worked; yet I had made no changes. :-( Very nice it''s working, but why the earlier "err: Could not retrieve catalog from remote server: wrong header line format" that cost me so much time? Seems buggy, but I reckon it''s me, the learning puppet user. Question: what are some debugging tips & tricks that you experts use when developing new module classes & templates, especially when the errors messages are so vague? What can I learn from this incident? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Tue, Feb 21, 2012 at 5:32 PM, thinkwell <thinkwelldesigns@gmail.com>wrote:> Shazzam - it worked; yet I had made no changes. :-( Very nice it''s > working, but why the earlier "err: Could not retrieve catalog from > remote server: wrong header line > format" that cost me so much time? Seems buggy, but I reckon it''s me, > the learning puppet user. >Any chance your puppet server is working overtime? Running behind webrick, or something else? I''ve noticed some weird "unexplained" errors when the server starts to get busy... -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.