Thank for the reminder, Felix
I figured out what I was missing:

The facts show up in a puppet manifest with no problem, but to get them to show 
on the facter command line, you need to add :

--external-dir=/var/lib/puppet/facts.d/ 

So, if I do it this way:

[user ]# facter --external-dir=/var/lib/puppet/facts.d/ patch_fact_1
hello

I get the response I was looking for.

And many thanks for the straight line "Might be a bug" which lets me say:

It is not a bug.  It is an Undocumented Feature :D

> On Mar 5, 2015, at 5:25 PM, Felix Frank <felix.fr...@alumni.tu-berlin.de> 
> wrote:
> 
> Hi Dan,
> 
> interesting, I think I can reproduce, with facter 2.4.1. Might be a bug.
> 
> I observe `puppet agent` opening my $vardir/facts.d files (through
> strace), but not `facter -p`.
> 
> Cheers,
> Felix
> 
> On 02/09/2015 05:41 PM, Dan White wrote:
>> Puppet 3.7.3
>> Facter 2.3.0
>> running on RHEL 6
>> 
>> Reference:
>> https://docs.puppetlabs.com/facter/2.2/custom_facts.html#fact-locations
>> 
>> I put a simple fact_file.txt in one of my modules to try this new feature.
>> When I run puppet agent, I see the fact file deployed to
>> /var/lib/puppet/facts.d/
>> However, I cannot get it to come out on a command line.
>> 
>> Here's the text file:
>> 
>> patch_fact_1=hello
>> patch_fact_2=there
>> patch_fact_3=every
>> patch_fact_4=one
>> 
>> (Module name is "patch")
>> 
>> facter -p patch_fact_1 returns a blank line
>> 
>> # facter -p patch_fact_1 --debug
>> Found no suitable resolves of 1 for ec2_metadata
>> value for ec2_metadata is still nil
>> 
>> And a full "facter -p" list does not show my 4 new facts
>> I am using /etc/facter/facts.d thru stdlib.  Do the two not play nice
>> in the same puppet-sandbox ?
>> 
>> I tried restarting the puppetmaster and re-running the agent - no change.
>> I copied the file to /etc/facter/facts.d/ , prefixing the file name
>> and all the fact names with "other_" to keep them separate.  The
>> "other_" facts appeared immediately (no surprise), but the originals
>> remain unavailable.
>> 
>> A clue or two, please ?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/54F8D7E8.5010103%40Alumni.TU-Berlin.de.
> For more options, visit https://groups.google.com/d/optout.

“Sometimes I think the surest sign that intelligent life exists elsewhere in 
the universe is that none of it has tried to contact us.” 
Bill Waterson (Calvin & Hobbes)

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/C35EBF3C-CC71-4827-8434-C782526140F9%40icloud.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to