trunc number in manifest

21 views
Skip to first unread message

MaryG

unread,
Mar 10, 2015, 10:30:03 AM3/10/15
to puppet...@googlegroups.com
Hi,
I get this value from fact:
 $shmmax = <<$facts['memorysize_mb']*1024*1024)/2

I want to trunc since I get a float 963211427.84. I want to cut decimal numer and get  963211427.
How can I do it?

Jonathan Gazeley

unread,
Mar 11, 2015, 7:54:17 AM3/11/15
to puppet...@googlegroups.com
I would recommend using the `floor` function from puppetlabs/stdlib

https://forge.puppetlabs.com/puppetlabs/stdlib

Thanks,
Jonathan
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/feb8e41a-21c8-4a8e-a81b-0b571593c086%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages