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, and put chunks into separate files. This > falls outside the bounds of what embedded ruby can do. > > As for using define(), well, I am trying to separate the data from the > manifest, and putting N number of defines in the manifests and passing > values to it, breaks that. > > Doug. > > On Wed, Sep 21, 2011 at 2:48 PM, Aaron Grewell <aaron.grew...@gmail.com> > wrote: >> 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" <brian.gu...@brandorr.com> wrote: >>> 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 code) >>> 3) Embed ruby code to parse and format your variables into configuration >>> >>> See http://docs.puppetlabs.com/guides/templating.html for a bit more about >>> templates. >>> >>> -Brian >>> >>> On Wed, Sep 21, 2011 at 4:20 PM, Douglas Garstang >>> <doug.garst...@gmail.com>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 an external database, and dump out all >>>> variables that the node will need. The relevant puppet module(s) will >>>> then have to inject these variables into templates to be deployed to >>>> the systems. >>>> >>>> Now, what if the number of variables that get dumped by the external >>>> node script is variable? And, what if these variables are broken into >>>> chunks that need to be split into different files on the remote >>>> system? How would I do such a complex thing in puppet? A lack of any >>>> type of looping constructs in puppet would seem to make this rather >>>> difficult. >>>> >>>> Doug. >>>> >>>> -- >>>> 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+unsubscr...@googlegroups.com. >>>> For more options, visit this group at >>>> http://groups.google.com/group/puppet-users?hl=en. >>>> >>>> >>> >>> >>> -- >>> <http://aws.amazon.com/solutions/solution-providers/brandorr/> >>> >>> -- >>> 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+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/puppet-users?hl=en. >>> >> >> -- >> 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+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> > > > > -- > Regards, > > Douglas Garstang > http://www.linkedin.com/in/garstang > Email: doug.garst...@gmail.com > Cell: +1-805-340-5627 > > -- > 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+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > -- Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.wh...@ttiltd.com 1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com Need help communicating between generations at work to achieve your desired success? Let us help! -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.