[Puppet Users] Re: Custom Providers and Third Party Gems

2014-10-15 Thread Corey Osman
Just to add. If you can remove any gem dependency by reimplementing that functionality inside your own provider or even create some helper code I would try that. There is a section in Nan's book that details how to distribute external helper code inside the module for native types/providers.

Re: [Puppet Users] Re: Custom Providers and Third Party Gems

2014-10-03 Thread Nan Liu
On Fri, Oct 3, 2014 at 7:23 AM, jcbollinger wrote: > > > On Thursday, October 2, 2014 12:54:06 PM UTC-5, Chris Pitman wrote: >> >> Hey everyone, >> >> I'm hoping someone can enlighten me here: Why is it so hard/complicated >> to use third party gems when developing a custom provider? It seems to

[Puppet Users] Re: Custom Providers and Third Party Gems

2014-10-03 Thread jcbollinger
On Thursday, October 2, 2014 12:54:06 PM UTC-5, Chris Pitman wrote: > > Hey everyone, > > I'm hoping someone can enlighten me here: Why is it so hard/complicated to > use third party gems when developing a custom provider? It seems to me that > pulling in gems should be priority #1, since it al

[Puppet Users] Re: Custom Providers and Environmemts.

2012-08-14 Thread Douglas Garstang
On Tue, Aug 14, 2012 at 2:25 PM, Douglas Garstang wrote: > I've installed the puppet labs lvm module. After fixing the missing > "}" at line 20 in init.pp (really?!?!), I'm getting this:' > > err: Could not retrieve catalog from remote server: Error 400 on > SERVER: Puppet::Parser::AST::Resource f

[Puppet Users] Re: Custom providers/types correct location

2012-07-25 Thread David Campos
Excuse me, I did just type from my memory without an exact look to path :). The folder structure that happens to be deployed is the following: Glassfish dir PUPPET\CONFDIR\MODULES\GLASSFISH\LIB \---puppet +---provider | | asadmin.rb | | | +---application | |

[Puppet Users] Re: Custom providers/types correct location

2012-07-24 Thread Nick Fagerlund
On Tuesday, July 24, 2012 9:33:28 AM UTC-7, ZJE wrote: > > I'm using Puppet 3.0.0rfc3, so your YMMV, but for me it's > /lib/puppet/provider/ > and /lib/puppet/type > Note both "type" and "provider" are both singular - there's no trailing > 's'. > What ZJE said. The docs are here: http://doc

[Puppet Users] Re: Custom providers/types correct location

2012-07-24 Thread ZJE
On Tuesday, July 24, 2012 10:33:11 AM UTC-5, David Campos wrote: > > Hello all, > > I do not know whether I have hit a bug or it is just a misconception about > puppet configuration but I have found a strange inconsistency setting > custom providers and types. Theoretically, custom providers and

Re: [Puppet Users] Re: Custom providers - instalation and usage of an executable

2011-11-07 Thread Stefan Schulte
On Mon, Nov 07, 2011 at 03:25:33AM -0800, David Campos wrote: > I tested the optional_command solution with success. The virtual > machine could be provisioned but the first time, any reference to the > asadmin provider failed even though the binary was present. I presume > that once the prefetch o

[Puppet Users] Re: Custom providers - instalation and usage of an executable

2011-11-07 Thread David Campos
I tested the optional_command solution with success. The virtual machine could be provisioned but the first time, any reference to the asadmin provider failed even though the binary was present. I presume that once the prefetch of providers has been done and failed, then that type and provider beco

[Puppet Users] Re: Custom providers - instalation and usage of an executable

2011-10-28 Thread jcbollinger
On Oct 27, 2:35 pm, Stefan Schulte wrote: > On Thu, Oct 27, 2011 at 08:00:05AM -0700, David Campos wrote: > > Hello all, > > > I am facing a problem while dealing with a custom provider and its > > requirements. I have included a custom provider (with its custom > > types) into my puppet deploym

Re: [Puppet Users] Re: Custom providers

2011-01-17 Thread Stefan Schulte
On Mon, Jan 17, 2011 at 07:26:36PM -0800, pl wrote: > Process.uid was telling me 500, which was the intended user. whoami > inside the execpipe was root though. > > I've ended up doing this > > def self.exec_as_user(op, pkg) > > Puppet::Util::SUIDManager.asuser("node", "node") do > s

Re: [Puppet Users] Re: Custom providers

2011-01-17 Thread Daniel Pittman
On Mon, Jan 17, 2011 at 19:26, pl wrote: >> Can you instrument your code to >> dump Process.uid and Process.gid from Ruby-space in the block?  That >> way we can help narrow down where things are going wrong. > > Process.uid was telling me 500, which was the intended user. whoami > inside the exe

[Puppet Users] Re: Custom providers

2011-01-17 Thread pl
Hi, > Can you instrument your code to > dump Process.uid and Process.gid from Ruby-space in the block?  That > way we can help narrow down where things are going wrong. Process.uid was telling me 500, which was the intended user. whoami inside the execpipe was root though. I've ended up doing th

Re: [Puppet Users] Re: Custom providers

2011-01-17 Thread Daniel Pittman
On Sun, Jan 16, 2011 at 20:00, pl wrote: >>     Puppet::Util::SUIDManager.asuser("username", "group") do >>       # do stuff here as different user >>     end > > Not sure this works how you suggested as this In the current codebase, it will silently ignore the request if you are either on Windo

[Puppet Users] Re: Custom providers

2011-01-16 Thread pl
Hi, > Puppet::Util::SUIDManager.asuser("username", "group") do > # do stuff here as different user > end Not sure this works how you suggested as this Puppet::Util::SUIDManager.asuser("userx", "userx") do execpipe("whoami") do |output| Will report root, not userx. I'll check th

Re: [Puppet Users] Re: Custom providers

2011-01-10 Thread Stefan Schulte
On Mon, Jan 10, 2011 at 05:06:04PM -0800, pl wrote: > Hi, > > > Puppet::Provider::Package defines the prefetch class method. This is > > called at the beginning of the puppet run to find matches between existing > > packages and the one you described in your manifest. Prefetch calls > > instances

[Puppet Users] Re: Custom providers

2011-01-10 Thread pl
Hi, > Puppet::Provider::Package defines the prefetch class method. This is > called at the beginning of the puppet run to find matches between existing > packages and the one you described in your manifest. Prefetch calls > instances which should return an array of provider instances. One > provid

Re: [Puppet Users] Re: Custom providers

2011-01-09 Thread Stefan Schulte
On Sun, Jan 09, 2011 at 09:29:00PM -0800, pl wrote: > Hi, > > So, after setting pluginsync = true I manage to get this working, but > only executing correctly as puppetd --test > > Except that it only functions correctly when run as puppetd --test, > when I run it as the puppet service the custom

[Puppet Users] Re: Custom providers

2011-01-09 Thread pl
Hi, So, after setting pluginsync = true I manage to get this working, but only executing correctly as puppetd --test Except that it only functions correctly when run as puppetd --test, when I run it as the puppet service the custom provider does not do anything. This seems odd. The only notice

[Puppet Users] Re: Custom providers

2011-01-05 Thread pl
On Jan 6, 4:01 pm, pl wrote: >   def install >     output = `sudo -u node sh -c \"export PATH=/home/node/opt/bin:$ > {PATH}; npm install http-console\"` >     if output =~ /npm not ok/ >       raise Puppet::ExecutionFailure, "Failed to install > #{resource[:name]}" >     end >   end Note that