Re: [Puppet Users] Variable number of variables in external node output...

2011-09-22 Thread Aaron Grewell
Yes, but if he doesn't like defines then create_resources is probably out as well. On Thu, Sep 22, 2011 at 10:22 AM, Craig White wrote: > Isn't this the itch that create_resources is designed to scratch? > > Craig > > On Sep 21, 2011, at 4:26 PM, Douglas Garstang wrote: > > > Thanks, but I'm not

Re: [Puppet Users] Variable number of variables in external node output...

2011-09-22 Thread Craig White
Isn't this the itch that create_resources is designed to scratch? Craig On Sep 21, 2011, at 4:26 PM, Douglas Garstang wrote: > Thanks, but I'm not sure templates will quite cut it. There is no way > that I am aware of to iterate over all the variables obtained through > an external node script,

Re: [Puppet Users] Variable number of variables in external node output...

2011-09-21 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > 1) Use a template. Templates have embedded ruby code and run on the clients. template() is a function and as any other function it will run on the server. ~pete -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG w

Re: [Puppet Users] Variable number of variables in external node output...

2011-09-21 Thread Nigel Kersten
On Wed, Sep 21, 2011 at 1:20 PM, Douglas Garstang wrote: > All, > > I have a situation where I need to get some fairly complex > configuration files onto systems, and I'm wondering if puppet can even > do this. Lets say that my external node script will go and source all > the data it needs from a

Re: [Puppet Users] Variable number of variables in external node output...

2011-09-21 Thread Douglas Garstang
Thanks, but I'm not sure templates will quite cut it. There is no way that I am aware of to iterate over all the variables obtained through an external node script, and put chunks into separate files. This falls outside the bounds of what embedded ruby can do. As for using define(), well, I am try

Re: [Puppet Users] Variable number of variables in external node output...

2011-09-21 Thread Aaron Grewell
Remember too that if you can do it once (say with a define) Puppet will do it as many times as you like just by putting the data in an array. On Sep 21, 2011 2:39 PM, "Brian Gupta" wrote: > Puppet can do this. I would propose the following solution, but there may be > other ways to do it. > > 1) U

Re: [Puppet Users] Variable number of variables in external node output...

2011-09-21 Thread Brian Gupta
Puppet can do this. I would propose the following solution, but there may be other ways to do it. 1) Use a template. Templates have embedded ruby code and run on the clients. 2) Link to some library that allows you to query your database (You can use one or more require statements in your ruby cod