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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.