/etc/puppet/modules is used for deploying needed providers, functions and facts to agents during a catalog application. The master uses it to serve those providers, functions, and facts and if modulepath is passed to a puppet apply, it will also pluginsync those files to the puppet libdir. `facter -p` only adds the puppet libdir to its load path, so facts in the modulepath won't be available.
On Wed, Nov 6, 2013 at 5:27 PM, Sergey Sudakovich <sudy...@gmail.com> wrote: > Aha, I see so my puppet libdir is /var/lib/puppet/lib, but why when I > install a module, it goes into /etc/puppet/modules? > > > On Wednesday, November 6, 2013 5:07:39 PM UTC-8, Matthaus Litteken wrote: >> >> Sergey, >> `facter -p` adds puppet's libdir to the load path to load module based >> facts. When running against a master, facts are pluginsynced into this >> directory prior to facter running. You need to make sure that the >> facter directory from your module is in your puppet libdir (you can >> find out what yours is set to by running `puppet agent --configprint >> libdir`). So if your puppet libdir was /var/lib, your libdir should >> look like the following to ensure custom facts are loaded. >> >> var >> └── lib >> └── facter >> ├── custom_fact.rb >> ├── license >> │ └── thing.rb >> ├── moar_facts.rb >> ├── other_fact.rb >> └── root_home.rb >> >> On Wed, Nov 6, 2013 at 1:37 PM, Sergey Sudakovich <sud...@gmail.com> >> wrote: >> > Do deploy the module, I just do this: >> > puppet module install -f license-0.1.0.tar.gz >> > Then to test, i run >> > puppet module list >> > /etc/puppet/modules >> > └──my-license (v0.1.0) >> > >> > facter -p gives me the same output and facter with no parameters. >> > >> > >> > On Tuesday, November 5, 2013 5:48:46 PM UTC-8, Matthaus Litteken wrote: >> >> >> >> How are you deploying the module? Facter won't load module based facts >> >> by >> >> default, you need to use 'facter -p' to have Facter load those facts. >> >> >> >> On Tuesday, November 5, 2013, Sergey Sudakovich wrote: >> >>> >> >>> When I deploy a module I wrote with couple of custom facts, those >> >>> facts >> >>> do not show up in factor. >> >>> But when I point FACTORLIB to the directory with those factor, they >> >>> work >> >>> just fine. >> >>> I am running a masterless puppet version 2.7.22 and factor 1.7.1 >> >>> The module structure looks like so: >> >>> >> >>> -license >> >>> ---lib >> >>> -----facter >> >>> -------license.rb >> >>> -------hardware_serial.rb >> >>> -----puppet >> >>> >> >>> >> >>> Any idea what is causing this problem or at least where to start the >> >>> debugging? >> >>> >> >>> -- >> >>> 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...@googlegroups.com. >> >>> To view this discussion on the web visit >> >>> >> >>> https://groups.google.com/d/msgid/puppet-users/58f49f57-f55c-425f-b408-1b286336ddb7%40googlegroups.com. >> >>> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> >> >> >> >> >> -- >> >> Matthaus Owens >> >> Release Manager, Puppet Labs >> >> >> >> Join us at PuppetConf 2014, September 23-24 in San Francisco >> > >> > -- >> > 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...@googlegroups.com. >> > To view this discussion on the web visit >> > >> > https://groups.google.com/d/msgid/puppet-users/6aa31c1c-e492-43ae-9d79-e1acc84760a0%40googlegroups.com. >> > >> > For more options, visit https://groups.google.com/groups/opt_out. >> >> >> >> -- >> Matthaus Owens >> Release Manager, Puppet Labs >> >> Join us at PuppetConf 2014, September 23-24 in San Francisco > > -- > 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/6535d35d-aef4-4dce-9675-67c5c44d3e99%40googlegroups.com. > > For more options, visit https://groups.google.com/groups/opt_out. -- Matthaus Owens Release Manager, Puppet Labs Join us at PuppetConf 2014, September 23-24 in San Francisco -- 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/CACD%3DwAfQyaHO%3D_g8h9pb6EiQJe--%3DS8AQkg1WOgjBqmZq-pcMA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.