[Puppet Users] Have puppet store updated facts in couchdb without updating configuration

2012-07-06 Thread ZJE
We have a test puppet environment where we use couchDB as a facts terminus. We are thinking of using facter+couch as our new inventory system and would like to be able to pull inventory without having to resolve puppet configurations on our servers (we have very strict change management procedu

Re: [Puppet Users] Have puppet store updated facts in couchdb without updating configuration

2012-07-11 Thread ZJE
any allow * --- On Friday, July 6, 2012 11:14:00 AM UTC-5, Dan Bode wrote: > > > > On Fri, Jul 6, 2012 at 9:01 AM, ZJE wrote: > >> We have a test puppet environment where we use couchDB as a facts >> terminus. We are thinking of using facter+couch as our new inventory system

[Puppet Users] Hierachy for facts?

2012-07-16 Thread ZJE
We're working on prototpying facter+puppet for our environment and wondering what the generally accepted best-pratices are for handling hierarchical custom facts in facter. Right now, we're using underscores. For example, if I'm collecting infromation about the raid array, it would be someth

[Puppet Users] Method across providers for the same type

2012-07-17 Thread ZJE
I'd like to reuse the same ruby code in a type across all the providers. For the type I'm writing, a certain portion of the "exists?" method would be repeated across all providers. From looking at the documentation, http://docs.puppetlabs.com/guides/custom_types.html, it's not quite clear how I

Re: [Puppet Users] Method across providers for the same type

2012-07-17 Thread ZJE
On Tuesday, July 17, 2012 12:29:52 PM UTC-5, Jeff McCune wrote: > > On Tue, Jul 17, 2012 at 9:49 AM, Nan Liu <> wrote: > >> On Tue, Jul 17, 2012 at 8:34 AM, ZJE <> wrote: >> > I'd like to reuse the same ruby code in a type across all the >> prov

Re: [Puppet Users] Method across providers for the same type

2012-07-17 Thread ZJE
On Tuesday, July 17, 2012 2:02:10 PM UTC-5, ZJE wrote: > > > On Tuesday, July 17, 2012 12:29:52 PM UTC-5, Jeff McCune wrote: >> >> On Tue, Jul 17, 2012 at 9:49 AM, Nan Liu <> wrote: >> >>> On Tue, Jul 17, 2012 at 8:34 AM, ZJE <> wrote: >>>

[Puppet Users] Shared helper functions for facter

2012-07-18 Thread ZJE
I've started writing custom ruby facts and storing them in a location specified by $FACTERLIB. I would like to reuse some code I have repeated in multiple .rb files, but I'm not quite sure what path to save the module/class in. I'd like to have them in a customizable location and I'd rather not

[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] Method across providers for the same type

2012-07-24 Thread ZJE
On Tuesday, July 17, 2012 2:29:55 PM UTC-5, ZJE wrote: > > > On Tuesday, July 17, 2012 2:02:10 PM UTC-5, ZJE wrote: >> >> >> On Tuesday, July 17, 2012 12:29:52 PM UTC-5, Jeff McCune wrote: >>> >>> On Tue, Jul 17, 2012 at 9:49 AM, Nan Liu <> w

[Puppet Users] aggregate facts

2012-07-24 Thread ZJE
In our environment, we publish a SKU to identify each class of server, such that a server with X CPUs, Y DIMMS, and Z disks is SKU-2012-123. I would like to create a custom fact to take this information from facter and generate these SKUs. I'm relatively new to ruby, so I'm wondering what the b

Re: [Puppet Users] Method across providers for the same type

2012-07-25 Thread ZJE
On Wednesday, July 25, 2012 9:57:20 AM UTC-5, Jeff McCune wrote: > > On Tue, Jul 24, 2012 at 9:54 AM, ZJE wrote: > >> I'm still a little confused - is there an example of a type/provider >> where this is done correctly? >> Thanks! >> > >

[Puppet Users] Re: Modify Facter Value

2012-07-31 Thread ZJE
It may be best to hold your value in a temporary variable and just have the setcode run at the end. I can't remember where I read it, but I don't think ruby custom facts can override other ruby custom facts once they are set (thought I believe the FACTER_ environment variables can override ruby

[Puppet Users] Access @resouce in custom type

2012-07-31 Thread ZJE
Is it possible to access @resource variables inside a type? I would like to make some decisions on parameters based on other parameters that may have already been set. For example, --- newparam(:param1) do Puppet.debug "Found drivesperarray parameter" desc "parameter 1" validate do

[Puppet Users] Re: Access @resouce in custom type

2012-07-31 Thread ZJE
On Tuesday, July 31, 2012 4:05:28 PM UTC-5, ZJE wrote: > > Is it possible to access @resource variables inside a type? > > I would like to make some decisions on parameters based on other > parameters that may have already been set. > > For example, > ---

[Puppet Users] Get extra error output when debugging custom types?

2012-07-31 Thread ZJE
Is it possible to get extra output when running custom types? Right now, I'm getting an error message and I'm not sure where in the code it's being thrown from. For example, I can see that I'm trying to iterate over a null object, but I'm not sure where in the code this happening when the messag

[Puppet Users] Re: Access @resouce in custom type

2012-08-01 Thread ZJE
On Tuesday, July 31, 2012 6:54:14 PM UTC-5, Nick Lewis wrote: > > On Tuesday, July 31, 2012 2:05:28 PM UTC-7, ZJE wrote: >> >> Is it possible to access @resource variables inside a type? >> >> I would like to make some decisions on parameters based on other >&

Re: [Puppet Users] Get extra error output when debugging custom types?

2012-08-01 Thread ZJE
On Tuesday, July 31, 2012 6:07:40 PM UTC-5, Stefan Schulte wrote: > > On Tue, Jul 31, 2012 at 03:24:15PM -0700, ZJE wrote: > > Is it possible to get extra output when running custom types? Right now, > > I'm getting an error message and I'm not sure where in the co

[Puppet Users] getting output from command in custom provider

2012-08-13 Thread ZJE
Is the output of a command called by puppet stored somewhere on the master or agent? For example, if have the statement --- commands :ls => "ls" --- and then I try something like " ls, '/' " where does the output of "ls /" go? I've tried poking around in vardir on both the master and the agent

[Puppet Users] Best way to bail from facter script without using confine in Facter.add ?

2012-08-22 Thread ZJE
I have a script in $FACTERLIB that queries proprietary vendor tools for RAID configuration. These tools are quite slow, so the top of my .rb file calls the program once and stores the output in a variable. Multiple Facter.add statements then populate the facts. I would like to bail on this cust

Re: [Puppet Users] Best way to bail from facter script without using confine in Facter.add ?

2012-08-22 Thread ZJE
ote: > > On Wed, Aug 22, 2012 at 8:49 AM, ZJE > > wrote: > > I have a script in $FACTERLIB that queries proprietary vendor tools for > RAID > > configuration. These tools are quite slow, so the top of my .rb file > calls > > the program once and stor

Re: [Puppet Users] Best way to bail from facter script without using confine in Facter.add ?

2012-08-23 Thread ZJE
On Wednesday, August 22, 2012 1:56:49 PM UTC-5, Nigel Kersten wrote: > > On Wed, Aug 22, 2012 at 11:13 AM, ZJE > > wrote: > > The slowdown comes from the command that I run before any Facter.add > > statements. It takes roughly 1.5 seconds to run and I would need to r

[Puppet Users] debugging hiera

2012-08-23 Thread ZJE
Is there a way to check which data file(s) hiera is attempting to parse? I tried "puppet -d" with no luck. I'm wanting to select the variable "dnsservers" based on a custom fact. --- Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find data item dnsservers

Re: [Puppet Users] debugging hiera

2012-08-23 Thread ZJE
On Thursday, August 23, 2012 12:07:18 PM UTC-5, R.I. Pienaar wrote: > > > > - Original Message - > > From: "ZJE" > > > To: puppet...@googlegroups.com > > Sent: Thursday, August 23, 2012 6:04:22 PM > > Subject: [Puppet Users] debugg

Re: [Puppet Users] Best way to bail from facter script without using confine in Facter.add ?

2012-08-23 Thread ZJE
On Thursday, August 23, 2012 12:18:12 PM UTC-5, Wolf Noble wrote: > > why not check to see if the binary which you're using to talk to the raid > hw exists.. if so, execute and provide facts, if not, do nothing.. > That's how it's being done in the hpacucli fact I've been using. > > That's the