[chef] Re: Re: Re: Re: changing the token delimiters inside the templates


Chronological Thread 
  • From: Jeremy Voorhis < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: changing the token delimiters inside the templates
  • Date: Fri, 21 Dec 2012 14:19:56 -0800

Can Chef use the tilt library for handling templates, or does it exclusively use ERB?

Jeremy


On Fri, Dec 21, 2012 at 2:11 PM, Maven User < " target="_blank"> > wrote:
NVM - I'm going to make maven understand erb syntax instead (for one module).

http://maven.apache.org/plugins/maven-resources-plugin/copy-resources-mojo.html

<delimiters>
  <delimiter>${*}</delimiter>
  <delimiter>@</delimiter>
</delimiters>

(I think :-)



On Fri, Dec 21, 2012 at 5:10 PM, Maven User < " target="_blank"> > wrote:
Yeah, I'd REALLY like to teach chef how to use ${}'s instead of <%>'s

Daniel - thank you!


On Fri, Dec 21, 2012 at 4:09 PM, Daniel DeLeo < " target="_blank"> > wrote:

On Friday, December 21, 2012 at 12:53 PM, Vladimir Girnet wrote:

Chef is using standard Ruby ERB for templates - http://ruby-doc.org/stdlib-1.8.7/libdoc/erb/rdoc/ERB.html


On Dec 21, 2012, at 10:41 PM, Maven User wrote:

Hi all -

Is there a way to change the token delimiters chef uses inside the templates to some other format?

Just curious - this would make my life 300% easier if this were true...


Chef actually uses erubis which is mostly compatible but has some extra features:

If you're looking to, say, include a literal `<%` in your output, according to the docs this can be done with `<%%`.

The docs also explain how to change the "embedding pattern" but chef doesn't expose any way to change it:


-- 
Daniel DeLeo







Archive powered by MHonArc 2.6.16.

§