On Oct 13, 2008, at 1:44 PM, Martin Englund wrote:

>
> Gang,
>
> I've got a question regarding how facter works, specifically the
> domain fact:
>
> we're using a NIS domain name (mpklab.sfbay.sun.com) which differs
> from the DNS domain name (sfbay.sun.com), and it screws with the
> certificate names. So I thought I would just add a dnsdomainname
> script which chops off the mpklab part, but the setcode part doesn't
> get executed.
>
> I've added debug output to verify that only the setcode section for
> trying the "domainname" command is executed:
> [...]
> Can anyone enlighten me why it skips the dnsdomainname setcode block?


Facter uses the first found value.

Unfortunately, it currently has no way to specifically force a higher  
priority on a resolution mechanism -- this would be a good thing to  
file as a feature request.

However, resolutions are sorted in descending order by the number of  
confinements, so if you add a confine you know will be true (e.g., in  
your case, confine :operatingsystem => :solaris), then your extra  
confine will cause your fact resolution mechanism to be sorted first.

Yes, I know this is hackish; please file a feature request, as it'd be  
pretty easy to fix at this point (because of refactoring in 1.5).

-- 
The world is round; it has no point.
     -- Adrienne E. Gusoff
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to