Dear,

I've been using puppet for some time now. Usually when I have a problem I 
read all documentation refered to the problem I have.

Recently I was trying to write a puppet erb template, that checks if host 
has one class defined, and if it has then writes some text to cron.

After a lot of googleing, I found that the best way to do this was:

<% if classes.include?( 'class1' ) -%>
Some text
<% end -%>

And this worked.

But when I try on the same erb file to look for other classes, then it only 
processes 1:
<% if classes.include?( 'class1' ) -%>
Some text
<% end -%>
<% if classes.include?( 'class2' ) -%>
Blah Blah Blah
<% end -%>

I can find only "Some text" inside file. But this host has class2 also 
declared. If I remove if classes.include of class1, and leave alone class2 
text, then I can see the text of class2.

Did anyone had this issue before?

Thanks for your time.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to