hello,

----- "James Cammarata" <[email protected]> wrote:

> I've created a custom fact to detect whether my server is a physical
> box or a VMware guest, and have the following class:

Was the included virtual fact not working for you?

> class server_management {
>   notice("hw_type=$hw_type")
>   case $hw_type {
>     "physical" : { notice("this is a physical system") }
>     "virtual"  : { notice("this is a virtual system") }
>     default    : { warning("the hw_type fact is not present") }
>   }
> }
> 
> However, when I run puppetd, I never see any notices or warnings.  Am I
> missing the purpose of these functions?  They work fine if they're used
> outside of a class, but I can't seem to get them to print anything out
> as used above.  

Functions get executed at compile time on the master, you'll probably see logs 
there.

To log on the client do:

notify{"hw_type=${hw_type}": }

-- 
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