David Schmitt wrote:

> Peter Meier wrote:

>> it looks like memory is somehow a special variable (dunno why), but if
>> you don't name your variable memory, it works.

> $memory is a fact containing amount of memory on the client.

No, it isn't.  At least not a fact that facter (version 1.5.5) reports.
And $memory isn't available in the manifests unless I set it explicitly.

And even if it were, variable assignments in the manifests override
facts.  Compare the lines output from:

     node default
     {
         $memorysize = 4711
         notice(inline_template("memorysize = <%= memorysize %>"))
         notice(inline_template("memory (template) = <%= memory %>"))
         notice("\$memory = <$memory>")
         notice("\$memoryfree = <$memoryfree>")
     }

$memorysize *is* a fact from facter, and the above code tells me
"memorysize = 4711" (while facter says it is "1.93 GB").  On the
other hand, it says "$memory = <>", but "memory (template) = 105452"
(or some similar, but varying, figure).


I can of course work around it by doing '$xmemory = $memory' inside
my definition (I don't want to have a strange name as parameter to
the definition), and accessing "xmemory" from the template, but it's
not particularly pretty...

I'll file this as a bug then, probably later today.


        /Bellman

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to