It works now... The syntax was right all along. I was testing it on a VM which has less than a gig of mem, hence why it'd omit the logic, since it didn't apply. Sometimes the hurtles are a lot closer than you expect them to be :-)
On Jun 22, 9:20 am, CraftyTech <[email protected]> wrote: > Can anyone help out, and let me know why the line below omits > everything after the "=" sign, and just puts out the > "max_allowed_packet="? It seems pretty straight forward, but for some > reason it doesn't work. Can anyone spot what I'm missing? > > Thanks, > > Henry > > On Jun 21, 3:37 pm, CraftyTech <[email protected]> wrote: > > > Thanks for the response. Right now I have it: > > > max_allowed_packet=<% if $memorysize.to_i <= 4 %>8M<% elseif > > memorysize.to_i = 4.1..8 %>16M<% elseif memorysize.to_i = 8.1..16 > > %>32M<% elseif memorysize.to_i > 16 %>32M<%end %> > > > but for some reason ignores everything, and it just show > > "max_allowed_packet=" with no value afterwards... > > > On Jun 21, 11:41 am, Benoit Cattié <[email protected]> wrote: > > > > CraftyTech a écrit, le 21/06/2010 17:07:> Hello All, > > > > Hey, > > > > Can you guys point out to me, how do I do a case statement within > > > > a template? i.g: my.cnf > > > > > max_allowed_packet=<% case ($memorysize<=4) = 8M, case > > > > ($memorysize<=8) = 16M)? > > > > I think case dont support "order" comparaison. You can do it with if / > > > else. > > > > Otherwise case statement is : > > > max_allowed_packet=<% case memorysize when 4 %>8M<% when 8 %>16M<% end %> > > > > or > > > > max_allowed_packet=<% if memorysize.to_i <= 4 %>8M<% elsif > > > memorysize.to_i <= 8 %>16M<% end %>> I've tried different combinations, > > > but so far no luck. The syntax > > > > checker coughs up hair balls.... > > > > > Thanks, > > > > > Henry > > > > Benoit -- 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.
