[chef] Dynamic Template File


Chronological Thread 
  • From: "Soula, William" < >
  • To: "' '" < >
  • Subject: [chef] Dynamic Template File
  • Date: Mon, 7 May 2012 11:15:46 -0500
  • Accept-language: en-US
  • Acceptlanguage: en-US

Title: Dynamic Template File
My environment file has a config section with name, value pairs in it.  I am trying to output a template of those name, value pairs by putting the below code into my erb file in chef:
<% @config.each do |setting| -%>
<%= setting[0] %>=<%= setting[1] %>
<%end-%>

This works great the first time as it creates a property file with my name value pairs.

The problem is when the config section changes.  I get a Permission denied error, but if I rerun the recipe then everything works and the new value is in the property file.

How can I create dynamic property files from the environment json file?

Thanks,
Will

  • [chef] Dynamic Template File, Soula, William, 05/07/2012

Archive powered by MHonArc 2.6.16.

§