> Alternatively the cheap and hacky approach:
> $foo = inline_template("<%= (processorcount.to_i * 0.8).floor -%>")
That looks direct and sexy to me.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-us
On 15 November 2011 16:57, Jacob Helwig wrote:
> On 2011-11-15 07:24 , Tom Hall wrote:
> > Hi,
> >
> > Can you round in variable assignment expressions?
> >
> > I would like to be able to set
> >
> > $my_var = floor(::processorcount * 0.8)
> >
> > Cheers,
> > Tom
> >
>
> That should work just fin
On 2011-11-15 07:24 , Tom Hall wrote:
> Hi,
>
> Can you round in variable assignment expressions?
>
> I would like to be able to set
>
> $my_var = floor(::processorcount * 0.8)
>
> Cheers,
> Tom
>
That should work just fine as long as you define an rvalue function
called 'floor'. There shoul
Hi,
Can you round in variable assignment expressions?
I would like to be able to set
$my_var = floor(::processorcount * 0.8)
Cheers,
Tom
--
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@google