On 21 November 2010 15:55, Nick <oinksoc...@letterboxes.org> wrote: > Hi, > > A problem I've run into during my first attempts at writing manifests, is > knowing what possible facts are available, and for a given fact, what values > my > manifest might encounter. > > A classic one is the possible values of $operatingsystem, but it applies to > all > sorts of facts. > > Of course, I know that not all facts can be enumerated, but I had expected > there > be a catalog of common facts and their values somewhere, but there seems not > to > be. The Facter page [1] and API documentation [2] give rather scanty > information about anything, yet alone list any values. Ultimately I've been > forced to search out the source code and infer the values from that.
This is a good point and certainly an area we can improve on. To that end I've filed https://projects.puppetlabs.com/issues/5394 > Then there is the question of how consistent the list of facts and their > values > are from version to version of Puppet/Facter. That is even harder to discover > from the source code. This will get better in the future (tm) but will involve breaking compatibility backwards as we currently have some ill-defined and overlapping facts that don't have a consistent world view and as such attempts to "correct" them in the past have caused sites to break - eg domainname. We do try to avoid regressions in facts, but this has grown quite hard in some areas and prevented clarification due to ambiguities. What a particular fact name means should be much more apparent, visible and documented. > How do other people tackle this problem? For the most part you have a few options when first introducing puppet - run facter manually on your systems as part of a learning exercise, run in no-op mode for a bit and get to understand it's naming. In some cases sites have written custom facts to either override the supplied facts or complement them to give them the consistency you need. > 2. http://www.puppetlabs.com/downloads/facter/apidocs/ I'm not sure how much value those API docs are at the moment as facts are littered alongside library routines and there isn't much of a coherent whole. Paul -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.