erb syntaxe IF OR

2,781 views
Skip to first unread message

smain kahlouch

unread,
Apr 8, 2010, 10:15:02 AM4/8/10
to puppet...@googlegroups.com
Hi all,

I would like to specify a condition, what is the wright syntax for
<% if hostname == 'some' or 'someother' then %>

Thanks again,
Grifith

Peter Meier

unread,
Apr 8, 2010, 10:21:15 AM4/8/10
to puppet...@googlegroups.com
> I would like to specify a condition, what is the wright syntax for
> <% if hostname == 'some' or 'someother' then %>

erb is plain ruby, so have a look at the ruby language, how the right
syntax would be. I assume you would like to do something like:

<% if (hostname == 'some') || (hostname == 'someother') then %>

cheers pete

smain kahlouch

unread,
Apr 8, 2010, 12:34:58 PM4/8/10
to puppet...@googlegroups.com


2010/4/8 Peter Meier <peter...@immerda.ch>


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


Thanks it works perfectly, i'll take a look to the ruby language.

Reply all
Reply to author
Forward
0 new messages