On Fri, Dec 12, 2008 at 9:08 AM, Nigel Kersten <[email protected]> wrote:

>
> Karl, have a look at templating.
>
> http://reductivelabs.com/trac/puppet/wiki/PuppetTemplating
>
> If you make all of these variables facts, then you can use them inside
> an erb template to construct the file, so long as you're happy to be
> managing the whole file.
>
>
> On Fri, Dec 12, 2008 at 5:12 AM, Karl W. Lewis <[email protected]>
> wrote:
> > Greetings, all,
> >
> > I've looked around some at the puppet code, and naturally tried google,
> but
> > I don't see a solution to my configuration problem.  (I'm an absolute
> ruby
> > noob, however, so the answer may be starting at me; I just don't see it.)
> >
> > I'd like to use puppet to maintain the configuration of the Sybase
> > Interfaces file on a number of my servers.
> >
> > The format of an interfaces entry is like so:
> >
> > SybaseInstance
> >         master tcp ether 10.255.1.14 5000
> >         query tcp ether 10.255.1.14 5000
> >
> > The variable parts being the Instance Name, the IP Address, and the port.
> > The file is just a plain, old text file.
> >
> > All the examples I can find show how to manage a file where the records
> are
> > a single line long, and it isn't clear to me how to cope with a three,
> (or
> > four, if you wanted to count the optional blank line following), line
> > record.
> >
> > I believe I need to implement a type and a provider in order to
> accomplish
> > managing these files, but I'm coming up short in being able to deal with
> a
> > file formatted this way.  If anyone had any insights, or even actual
> *code*,
> > they'd be willing to share I'd be most appreciative.
> >
> > Thanks,
> >
> > Karl
> >
> > >
> >
>
>
>
> --
> Nigel Kersten
> Systems Administrator
> Tech Lead - MacOps
>
> >
>
Mr. Kersten, Mr. Turnbull,

Thank you, I am now studying templating in hopes that I can use that to make
this work.  I can manage the whole file, although I confess, I was rather
hoping that I could deal with it like the hosts file and add entries one at
a time based upon the type of server being configured.  (I mean, how cool is
the hosts function in puppet?  That right there sells the project.)  It
occurs to me, too, then that I could use templates to manage individual
entries as separate files, and have an exec resource that will put 'em all
together.  Thank you very kindly.

As an aside, I bought a copy, a couple of years ago now, I think, of Pro
Nagios 2.0 and then implemented Nagios here at work.  Rather more recently I
purchased a copy of Pulling Strings with Puppet, (it's even now sitting on
my associate's desk), and I am starting to implement puppet here.  Even a
casual observer might detect a pattern.

Be well,

KWL

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to