FAQ
Hi guys,
I've been working with Puppet on Windows 2.7.14, I trying to use my own
custom facts, but I have to put in on Windows Agent machine manually, I
tried using pluginsync=true, and I put my *.rb files on <My
Moudle>/lib/facter and It works but It only copy the files to
C:\ProgramData\PuppetLabs\puppet\var\lib\facter, and facter on windows
machine didn't find this facts, I have to put a FACTERLIB variable on
windows machine, pointing to both directories

FACTERLIB=C:\Program Files (x86)\Puppet
Labs\Puppet\facter\lib\facter;C:\ProgramData\PuppetLabs\puppet\var\lib\facter

puppet agent facter search facters on FACTERLIB=C:\Program Files
(x86)\Puppet Labs\Puppet\facter\lib\facter

How can I change this? May I change the pluginsync copy the customs facts
to C:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter instead
C:\ProgramData\PuppetLabs\puppet\var\lib\facter

I tried changing on C:\ProgramData\PuppetLabs\puppet\etc\puppet.conf adding
factpath to C:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter,
but the files didn't copy from master to the windows agent...

Any directions will be appreciated, thanks in advance..

Best Regards.

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/rYHK948k2J4J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Josh Cooper at May 24, 2012 at 8:13 pm
    Hi Marco,
    On Thu, May 24, 2012 at 7:35 AM, mparrad wrote:
    Hi guys,
    I've been working with Puppet on Windows 2.7.14, I trying to use my own
    custom facts, but I have to put in on Windows Agent machine manually, I
    tried using pluginsync=true, and I put my *.rb files on <My
    Moudle>/lib/facter and It works but It only copy the files to
    C:\ProgramData\PuppetLabs\puppet\var\lib\facter, and facter on windows
    machine didn't find this facts, I have to put a FACTERLIB variable on
    windows machine, pointing to both directories

    FACTERLIB=C:\Program Files (x86)\Puppet
    Labs\Puppet\facter\lib\facter;C:\ProgramData\PuppetLabs\puppet\var\lib\facter

    puppet agent facter search facters on FACTERLIB=C:\Program Files
    (x86)\Puppet Labs\Puppet\facter\lib\facter

    How can I change this? May I change the pluginsync copy the customs facts to
    C:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter instead
    C:\ProgramData\PuppetLabs\puppet\var\lib\facter

    I tried changing on C:\ProgramData\PuppetLabs\puppet\etc\puppet.conf adding
    factpath to C:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter, but
    the files didn't copy from master to the windows agent...

    Any directions will be appreciated, thanks in advance..

    Best Regards.

    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/puppet-users/-/rYHK948k2J4J.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to
    puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/puppet-users?hl=en.
    After puppet pluginsyncs, puppet should have access to those custom
    facts without modifying the environment.

    Note however, if you are running facter standalone, and want facter to
    include puppet-specific facts, e.g. puppetversion and pluginsync'ed
    facts, then you have to specify `facter --puppet`. Doing so, will
    cause facter to add `Puppet[:libdir]` to facter's $LOAD_PATH.

    Josh

    --
    Josh Cooper
    Developer, Puppet Labs

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Marco Parra D. at May 24, 2012 at 8:37 pm
    Hi Josh
    On 24-05-2012 16:13, Josh Cooper wrote:
    Hi Marco,

    On Thu, May 24, 2012 at 7:35 AM, mparradwrote:
    Hi guys,
    I've been working with Puppet on Windows 2.7.14, I trying to use my own
    custom facts, but I have to put in on Windows Agent machine manually, I
    tried using pluginsync=true, and I put my *.rb files on<My
    Moudle>/lib/facter and It works but It only copy the files to
    C:\ProgramData\PuppetLabs\puppet\var\lib\facter, and facter on windows
    machine didn't find this facts, I have to put a FACTERLIB variable on
    windows machine, pointing to both directories

    FACTERLIB=C:\Program Files (x86)\Puppet
    Labs\Puppet\facter\lib\facter;C:\ProgramData\PuppetLabs\puppet\var\lib\facter

    puppet agent facter search facters on FACTERLIB=C:\Program Files
    (x86)\Puppet Labs\Puppet\facter\lib\facter

    How can I change this? May I change the pluginsync copy the customs facts to
    C:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter instead
    C:\ProgramData\PuppetLabs\puppet\var\lib\facter

    I tried changing on C:\ProgramData\PuppetLabs\puppet\etc\puppet.conf adding
    factpath to C:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter, but
    the files didn't copy from master to the windows agent...

    Any directions will be appreciated, thanks in advance..

    Best Regards.

    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/puppet-users/-/rYHK948k2J4J.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to
    puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/puppet-users?hl=en.
    After puppet pluginsyncs, puppet should have access to those custom
    facts without modifying the environment.
    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?

    Thank you in advance,

    Best Regards..
    Note however, if you are running facter standalone, and want facter to
    include puppet-specific facts, e.g. puppetversion and pluginsync'ed
    facts, then you have to specify `facter --puppet`. Doing so, will
    cause facter to add `Puppet[:libdir]` to facter's $LOAD_PATH.

    Josh
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Jeff McCune at May 24, 2012 at 9:50 pm

    On Thu, May 24, 2012 at 1:33 PM, Marco Parra D. 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\lib

    Here's a screenshot of the default behavior of the MSI packages published
    at https://downloads.puppetlabs.com/windows/

    http://links.puppetlabs.com/windows_msi_plugindest.png

    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\lib

    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
    You 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

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Mparrad at May 25, 2012 at 1:17 pm
    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. 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


    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\lib

    Here's a screenshot of the default behavior of the MSI packages published
    at https://downloads.puppetlabs.com/windows/
    I installed using MSI file for 2.7.14 version, using default install
    http://links.puppetlabs.com/windows_msi_plugindest.png

    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\lib

    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
    You really shouldn't have to set FACTERLIB at all.
    Oh, I see, now If I run:

    C:\Windows\system32>facter --puppet udp_status
    true

    I got the value, but, now my doubt is, Can I use my custom facts inside my
    modules?...

    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?
    But If I don't stup FACTERLIB, facter on windows agent don't find my custom
    facts, facter is reading the facts on c:\Program Files (x86)\Puppet
    Labs\facter\lib\facter, not in the
    C:\ProgramData\PuppetLabs\var\lib\folder....


    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
    I'll try adding plugingdest in puppet.conf on windows node... If I change
    this value, Can I mess something else? I need use facter without --puppet...

    Thanks you Jeff

    -Jeff
    >


    Best regards..

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/Q6mQxkOwZTQJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Jeff McCune at May 25, 2012 at 2:43 pm

    On Fri, May 25, 2012 at 6:17 AM, mparrad 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. 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
    I 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

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Mparrad at May 25, 2012 at 7:15 pm
    Hi Jeff,
    On Friday, May 25, 2012 10:42:20 AM UTC-4, Jeff McCune wrote:
    On Fri, May 25, 2012 at 6:17 AM, mparrad 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.parra.d@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
    I think you forgot to copy and paste the output.
    Sorry , here is now:

    C:\Windows\system32>puppet agent --configprint plugindest
    C:/ProgramData/PuppetLabs/puppet/var/lib


    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.
    Thank you Jeff, this clarify me how puppet and facter works with custom
    facts.....

    -Jeff
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/2mnqFoZXmqYJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedMay 24, '12 at 2:35p
activeMay 25, '12 at 7:15p
posts7
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase