Issue #2066 has been updated by Daniel Pittman.
Theo Cabrerizo Diem wrote: > Is there any update on this issue ? > I'm running puppet 2.7.9 and facter 1.6.4 and such facts with units are quite > useless as they are :( > > #puppet apply -e 'notice($::memorysize)' -v > notice: Scope(Class[main]): 989.92 MB > # puppet apply -e 'notice($::memorysize / 2)' -v > left operand of / is not a number at line 1 on node blabla.mydomain Well, you can write Puppet code to reverse the calculation and get a useful number, but that really sucks. If someone gets the proposed change into decent shape and sends a pull request we would probably merge it; adding more facts is safe inside a stable series, and I am absolutely inclined to accept this into core in the form that is proposed without waiting for any more central or standard way to have this happen. Changing the central fact definition to have a fixed unit is useful, but not something we can do without a major release around it, to avoid breaking things for people who do depend on the current version. Like my code that did the reversing and all. :) ---------------------------------------- Bug #2066: Make units optional https://projects.puppetlabs.com/issues/2066 Author: Sam Quigley Status: Accepted Priority: Normal Assignee: Category: library Target version: 2.0.0 Keywords: Branch: Affected Facter version: For memory facts (and maybe other stuff?), Facter currently uses the largest unit it can (kb/mb/gb/tb), and only prints two decimal places of accuracy. On some of my systems, this means that the facts reported by facter are slightly wrong -- and it also introduces a bit of complexity into any program that wants to make use of these facts, since they have to translate back into machine-readable units... It'd be nice if there were an option to make facter report bytes instead... -sq -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" 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-bugs?hl=en.
