But my question was can I change the path where puppet copi the custom facts?
because when I run puppet agent, my custom facts were copied to c:\programdata\puppetlabs\facter\lib\facter
and facter didn't see it,
but when I set the variable FACTERLIB on window to:
set FACTERLIB=C:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter;C:\ProgramData\PuppetLabs\puppet\var\lib\facter
facter did see the custom fact:
C:\Windows\system32>facter udp_status
C:\Windows\system32>set FACTERLIB=C:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter;C:\ProgramData\PuppetLabs\puppet\var\lib\facter
C:\Windows\system32>facter udp_status
true
is there a way to change that?
On Thu, May 24, 2012 at 1:33 PM, Marco Parra D. <marco....@gmail.com> wrote:But my question was can I change the path where puppet copi the custom facts?Yes, this is the plugindest puppet agent option.What is it currently set to? You can check using puppet agent --configprint plugindest
because when I run puppet agent, my custom facts were copied to c:\programdata\puppetlabs\facter\lib\facter
and facter didn't see it,How did you install Puppet? Puppet shouldn't be copying custom facts into this directory, the default location on Windows is C:\ProgramData\PuppetLabs\puppet\var\libHere's a screenshot of the default behavior of the MSI packages published at https://downloads.puppetlabs.com/windows/
In the screenshot, you can see puppet agent downloads and loads plugins from C:\ProgramData\PuppetLabs\puppet\var\lib, facter doesn't load facts from here without the --puppet option, and that the plugindest setting is set to C:\ProgramData\PuppetLabs\puppet\var\libbut when I set the variable FACTERLIB on window to:
set FACTERLIB=C:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter;C:\ProgramData\PuppetLabs\puppet\var\lib\facterYou really shouldn't have to set FACTERLIB at all.
facter did see the custom fact:
C:\Windows\system32>facter udp_status
C:\Windows\system32>set FACTERLIB=C:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter;C:\ProgramData\PuppetLabs\puppet\var\lib\facter
C:\Windows\system32>facter udp_status
true
is there a way to change that?
Yes, this is the plugindest setting in puppet.conf. Please let me know if the default behavior is something other than the setting of C:\ProgramData\PuppetLabs\puppet\var\lib
-Jeff
Hi Jeff
On Thursday, May 24, 2012 5:50:03 PM UTC-4, Jeff McCune wrote:On Thu, May 24, 2012 at 1:33 PM, Marco Parra D. <marco....@gmail.com> wrote:But my question was can I change the path where puppet copi the custom facts?Yes, this is the plugindest puppet agent option.What is it currently set to? You can check using puppet agent --configprint plugindest
Here is the output for this:
puppet agent --configprint plugindest
On Fri, May 25, 2012 at 6:17 AM, mparrad <marco....@gmail.com> wrote:Hi Jeff
On Thursday, May 24, 2012 5:50:03 PM UTC-4, Jeff McCune wrote:On Thu, May 24, 2012 at 1:33 PM, Marco Parra D. <marco....@gmail.com> wrote:But my question was can I change the path where puppet copi the custom facts?Yes, this is the plugindest puppet agent option.What is it currently set to? You can check using puppet agent --configprint plugindest
Here is the output for this:
puppet agent --configprint plugindestI think you forgot to copy and paste the output.
In general there are a couple of key points.First, custom facts distributed via Puppet pluginsync are always available in your manifests.Second, if you distribute your custom facts via pluginsync you should use facter --puppet to load them with Facter. Keep in mind Facter and Puppet are two separate applications which is why --puppet is necessary.Third, Facter (and Puppet) load things from multiple places. This is how our plugin system works. With regard to Facter the libraries that come bundled in the package are installed to C:\Program Files (x86)\Puppet Labs\Puppet\facter\lib. You shouldn't ever need to tell Facter to load things from this path since it will load from here automatically. Also, you shouldn't ever put your own custom facts in this location since the package may overwrite the directory on an upgrade.Hope this helps.
-Jeff