On 4/26/2009 5:02 PM, Allan Marcus wrote: > Hello, > > I'm new to puppet and facter. Initially we are planning on using > facter/puppet to inventory machines (Mac, Ubuntu, and RHEL). We plan > on writing a number of custom facts. Obviouly some of the facts will > only be specific to some OSs. I know there is a "confine" method, but > it confuses me. It seems the confine statement in some of the recipes > and in the Turnbull book is checked after most of the work is done.
http://reductivelabs.com/trac/puppet/wiki/Recipes/HostgroupFact , http://reductivelabs.com/trac/puppet/wiki/Recipes/RaidFact , and http://reductivelabs.com/trac/puppet/wiki/Recipes/InterfaceName , at least, put their confine statements very early. > Does this code get executed in the kernel is not Linux, or is the fact > just not added is the kernel is not linux? I think it'll execute /usr/sbin/dmidecode as long as that file exists, and will add the fact as long as you're running Linux. > Also, should I bundle the facts into one document, say by platform, or > should each fact be in its own file? All my facts are stored in separate files, but that's mostly because my fact development tends to be pretty tightly-focused. Never needed to group them together. But I'd never separate them by platform, but just put the platform logic into the fact similar to what the InterfaceName recipe does. -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---