[chef] is there a smart way to tweak configurations file in chef? (or puppet, cfengine, or otherwise?)


Chronological Thread 
  • From: Thomas Hartman <thomashartman1@googlemail.com>
  • To: chef@lists.opscode.com
  • Subject: [chef] is there a smart way to tweak configurations file in chef? (or puppet, cfengine, or otherwise?)
  • Date: Thu, 30 Jul 2009 16:42:36 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=is9ZPrrnZFVvvQTmNATZmxi4HNqUoPdtPBongR14cMlVUXxDffPoOg5azqCu3LfO1d rc2lFPhy0wK4B1rXuBcLwv2wqY9QGotHlEY8tWMQ1Rs+0ZLI2mvojgqWJwxsMap2XnUL hiswbZRA2soag3tk2ur6OYfRxC0qNgyp9C2Dc=

I have this scenario where I have a my.cnf ini file, and I want to
make sure it has a certain value in a certain section. (Can't just
append to the end of the file.)

I solved this using the perl file, attached. Obviously this isn't a
perfect solution though. If the value is already set, but set wrong,
it won't work.

The right way to do this would be to parse the ini file and do something 
smart.

I am just wondering if this kind of tweak is a solved problem, in
chef, puppet, cfengine, or anywhere else.

Thanks in advance for any advice!

-- 
Thomas Hartman

Darcs hosting: patch-tag.com
Build a webapp with haskell: happstack.com

Attachment: insert_after_line.pl
Description: Perl program




Archive powered by MHonArc 2.6.16.

§