title: Using Chef to create config files
body: <p>The project I am on is considering bringing in Chef to help manage deployments. That seems perfectly reasonable as we have had issues configuring new machines/environments. However, they are now asking me to use Chef as a mechanism to create config files for a bunch of different environments and I am wondering if it is the right tool for the job. I've googled around quite a bit and haven't seen anyone using it like this...</p>
  
  <p>I have an xml file with a ton of options like the following (it is used to configure weblogic):</p>
  
  <pre><code>&lt;servers&gt;
      &lt;server&gt;
          &lt;name&gt;MANAGED_SERVER_1&lt;/name&gt;
          &lt;listenAddress&gt;machine46&lt;/listenAddress&gt;
          &lt;listenPort&gt;65501&lt;/listenPort&gt;
          &lt;listenPortSecure&gt;65502&lt;/listenPortSecure&gt;
          &lt;classpath&gt;/example/test/test.jar....
  </code></pre>
  
  <p>We have 12 different environments, each with different ports, names, etc. That would mean creating 12 separate xml files, writing something to do a search and replace in one master xml for each environment, or potentially using Chef.</p>
  
  <p>Will Chef serve this purpose? Is this even really what is SHOULD be used for? It's kind of being shoved down our throats at the moment.</p>
  
  <p>An example of modifying/creating multiple config files would be greatly appreciated.</p>