Issue #14494 has been updated by Ian Ward.
I found out what I was doing wrong and got this to work. I had declared a fact, MemorySizeInKBytes, and tried to use it (as capitalized) in the module. It appears that when facter loads in facts, it dumps everything to lowercase. When I tried to interpret the fact in the module, case sensitivity kicks in, and "MemorySizeInKBytes" doesn't exist. It is actually stored as "memorysizeinbytes" and must be referenced that way. I have corrected my configuration and this is no longer an issue for me. However, I don't remember ever seeing anything in the documentation about whatever forces everything to be lowercase; it might be worth documenting this in a few places to avoid future issues. Thanks. ---------------------------------------- Bug #14494: Puppet does not implicitly convert string to integer https://projects.puppetlabs.com/issues/14494#change-93163 * Author: Mathias Nestler * Status: Needs Decision * Priority: Normal * Assignee: * Category: * Target version: 2.7.15 * Affected Puppet version: 2.7.14 * Keywords: * Branch: ---------------------------------------- I refer to my post on serverfault (http://serverfault.com/questions/388944/how-to-convert-a-string-to-integer-in-puppet). In short I have the following code: $foo = '123' $result = $foo % 2 Puppet give me an `Could not match %` error. If I am using multiplication with this code: $foo = '123' $result = $foo * 2 I get a `left operand of * is not a number` error. **Therefore it seems to be that there is an error with implicitly converting a string to integer.** -- 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 unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
