Trunc number in manifest

20 views
Skip to first unread message

Mary Gamberi

unread,
Mar 10, 2015, 10:29:18 AM3/10/15
to puppe...@googlegroups.com
Hi, I get value from fact:
$shmmax = $facts['memorysize_mb']*1024*1024)/2
I need to trunc this number. The result is 963211427.84. But I want 963211427.
How can I do that?

Trevor Vaughan

unread,
Mar 10, 2015, 12:07:27 PM3/10/15
to puppe...@googlegroups.com
Hi Mary,

I would use the floor() function from puppetlabs-stdlib.

floor(($facts['memorysize_mb']*1024*1024)/2)

Trevor

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/9013ea4d-c118-49f8-9863-e8ae1cecff6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
tvau...@onyxpoint.com

-- This account not approved for unencrypted proprietary information --
Reply all
Reply to author
Forward
0 new messages