Issue #2157 has been updated by Adrien Thebo.

Branch changed from 
https://github.com/kbarber/facter/tree/ticket/2157-external_fact_support to 
https://github.com/adrienthebo/facter/tree/ticket/master/2157-external_fact_support

I've done a lot of work to split up Ken's work into a lot of small commits, but 
I don't have the bandwidth to finish this off. The code is at 
https://github.com/adrienthebo/facter/tree/ticket/master/2157-external_fact_support
 and while it could use some rebasing and squashing, the code looks solid (to 
me) and just needs a little gardening.
----------------------------------------
Feature #2157: External fact support
https://projects.puppetlabs.com/issues/2157#change-62617

Author: Paul Nasrat
Status: Code Insufficient
Priority: Normal
Assignee: Adrien Thebo
Category: interface
Target version: 2.0.0
Keywords: 
Branch: 
https://github.com/adrienthebo/facter/tree/ticket/master/2157-external_fact_support
Affected Facter version: 


Facter should support non-ruby facts, preferably in /etc/facter.d.  It should 
support these facts being either executable, in which case the result is the 
value of the named fact, or in a data format such as yaml, in which case the 
data file is read in and interpreted as the fact value.

It probably makes sense to initially stick to yaml for data formats, since json 
doesn't ship with ruby, and to also allow executable facts to return either a 
plain string or yaml.

Note that we can do this without supporting any kind of overriding, but it'd be 
much better if we supported multiple (configurable?) fact directories, with a 
search path. Thus, if Facter shipped with /etc/facter.d/myfactname and you 
wanted to override it, you could do so by creating a new file and putting it in 
a higher-priority location rather than editing a file distributed with the core.

Given we're adding structured data support, namespaced facts would be supported 
with directory structures; e.g., /etc/facter.d/my/fact/name would resolve to 
my::fact::name.

Ideally, the long-term direction here would be not to require any pure-ruby 
facts, such that the Facter library could be rewritten in any other language 
and it would function the same, because all of its actual data is outside of 
ruby.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to puppet-bugs@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-bugs+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to