I had issues with custom facts returning errors and or not finding the
custom facts until I created an additional module called "facterpath".
Here is the init.pp:
# /etc/puppet/modules/facterpath/manifests/init.pp
class facterpath {
file { "/etc/profile.d/facter.sh":
owner => 'root',
group => 'root',
mode => '0644',
source => "puppet:///files/etc/profile.d/facter.sh",
}
}
It simply pushes a facter.sh file to /etc/profile.d on all of my agents.
Here's the file that gets pushed:
# cat /etc/profile.d/facter.sh
export FACTERLIB=$FACTERLIB:/var/lib/puppet/lib/facter
So now when I log in the facter library becomes part of my ENV and no more
issues in using the custom facts on my agents.
*****************************
On Sunday, October 13, 2013 6:18:46 AM UTC-4, Martin Alfke wrote:
>
> Hi,
>
> On 13.10.2013, at 10:57, Sans <[email protected] <javascript:>> wrote:
>
> > [...]
>
> > The file is on the PuppetMaster. Hence the custom fact 'am_running_oss'
> is not available or empty when it runs on the agent. What are the options I
> have to make the custom facts(s) available on every single puppet agent?
> Thanks in advance. Cheers!!
> >
>
> You have to put the fact inside the lib/facter directory of a module and
> you have to enable pluginsync on all nodes puppet.conf.
> http://docs.puppetlabs.com/guides/plugins_in_modules.html
>
> hth,
>
> Martin
>
>
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.