brenton leanhardt
2008-Sep-15 14:17 UTC
[Puppet Users] "plugins in modules" and the puppet executable
I''m having a problem getting a custom function to resolve when running the ''puppet'' executable locally. I pass in the ''--modulepath'' where my modules live as well as a manifest that sets a few variables and includes the classes I wish to be applied. At parse time puppetd returns " Unknown function...". As mentioned in http://reductivelabs.com/trac/puppet/wiki/WritingYourOwnFunctions, I put the functions in my ruby site lib and it then worked. Is there any way to use the "Plugins in modules" feature (http://reductivelabs.com/trac/puppet/wiki/PluginsInModules) with the puppet executable? That doc doesn''t mention it, but I''m assuming "Plugins in Modules" works for custom functions as well since I believe that how everything just works when it runs with the full puppetmaster/puppetd stack. --Brenton --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Kenton Brede
2008-Sep-15 15:33 UTC
[Puppet Users] Re: "plugins in modules" and the puppet executable
2008/9/15 brenton leanhardt <brenton.leanhardt@gmail.com>:> > I''m having a problem getting a custom function to resolve when running > the ''puppet'' executable locally. I pass in the ''--modulepath'' where > my modules live as well as a manifest that sets a few variables and > includes the classes I wish to be applied. At parse time puppetd > returns " Unknown function...". > > As mentioned in > http://reductivelabs.com/trac/puppet/wiki/WritingYourOwnFunctions, I > put the functions in my ruby site lib and it then worked. Is there > any way to use the "Plugins in modules" feature > (http://reductivelabs.com/trac/puppet/wiki/PluginsInModules) with the > puppet executable? That doc doesn''t mention it, but I''m assuming > "Plugins in Modules" works for custom functions as well since I > believe that how everything just works when it runs with the full > puppetmaster/puppetd stack.I just created my first custom facts for one module. I don''t know if I did it the correct way, but this is what I did to get it to work: On the puppetmaster under [main] in puppet.conf: # Where Puppet looks for modules modulepath = /var/lib/puppet/files/modules # activate custom facts pluginsync = true # set path to custom facts (where the custom fact scripts reside) factpath = $modulepath/cron/plugins/facter puppet.conf on the clients, under [puppetd]: # Where puppetd should look for facts. factpath = /var/lib/puppet/lib/facter # activate custom facts pluginsync = true hth, Kent --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
brenton.leanhardt@gmail.com
2008-Sep-15 16:45 UTC
[Puppet Users] Re: "plugins in modules" and the puppet executable
On Sep 15, 11:33 am, "Kenton Brede" <kbr...@gmail.com> wrote:> 2008/9/15 brenton leanhardt <brenton.leanha...@gmail.com>: > > > > > > > I''m having a problem getting a custom function to resolve when running > > the ''puppet'' executable locally. I pass in the ''--modulepath'' where > > my modules live as well as a manifest that sets a few variables and > > includes the classes I wish to be applied. At parse time puppetd > > returns " Unknown function...". > > > As mentioned in > >http://reductivelabs.com/trac/puppet/wiki/WritingYourOwnFunctions, I > > put the functions in my ruby site lib and it then worked. Is there > > any way to use the "Plugins in modules" feature > > (http://reductivelabs.com/trac/puppet/wiki/PluginsInModules) with the > > puppet executable? That doc doesn''t mention it, but I''m assuming > > "Plugins in Modules" works for custom functions as well since I > > believe that how everything just works when it runs with the full > > puppetmaster/puppetd stack. > > I just created my first custom facts for one module. I don''t know if I > did it the correct way, but this is what I did to get it to work: > > On the puppetmaster under [main] in puppet.conf: > > # Where Puppet looks for modules > modulepath = /var/lib/puppet/files/modules > > # activate custom facts > pluginsync = true > > # set path to custom facts (where the custom fact scripts reside) > factpath = $modulepath/cron/plugins/facter > > puppet.conf on the clients, under [puppetd]: > > # Where puppetd should look for facts. > factpath = /var/lib/puppet/lib/facter > > # activate custom facts > pluginsync = trueIn my case I''m trying simply to use the puppet executable, not puppetd or puppetmaster. In the end I figured out my problem. I was trying to set ''--pluginpath'' on the command line but I didn''t notice that the configuration reference mentioned that was deprecated. Setting ''-- libdir'' to the path where my plugins were located worked for me.> > hth, > Kent--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---