[chef] Re: Re: <% %> in template files


Chronological Thread 
  • From: Charles Burns < >
  • To:
  • Subject: [chef] Re: Re: <% %> in template files
  • Date: Tue, 16 Oct 2012 13:37:17 -0400

That worked perfectly. <%%PRI%> in the template renders <%PRI%> in the chef-generated file.

Thanks again!

On Tue, Oct 16, 2012 at 1:32 PM, Charles Burns < " target="_blank"> > wrote:
Awesome, will give that a shot, thanks!



On Tue, Oct 16, 2012 at 1:30 PM, Kevin Karwaski < " target="_blank"> > wrote:
Hey Charles,

You might try this:

http://stackoverflow.com/questions/2322413/how-do-i-escape-erb-code-in-fixtures

On Tue, Oct 16, 2012 at 1:27 PM, Charles Burns < " target="_blank"> > wrote:
> I have a line I need to add to my rsyslog.conf.erb template, but chef
> doesn't seem to like it because it contains the characters <% and %> and
> there's not any ruby between them.
>
> For example, I added this line to my template (it needs to be added to the
> rsyslog.conf on all my nodes):
>
> $template GRAYLOG2,"<%PRI%>1 %timegenerated:::date-rfc3339% %HOSTNAME%
> %syslogtag% - %APP-NAME%: %msg:::drop-last-lf%\n"
>
> but chef seems to be getting confused by <%PRI%>
>
> What do people suggest to work around this? Is there some way I can escape
> those characters in a template or tell chef to treat them literally and not
> as a ruby command or variable marker?
>
> --
> ----------------------------
> Charles J. Burns
> " target="_blank">



--
Kevin Karwaski
Operations Engineer @ {Fiksu}



--
----------------------------
Charles J. Burns
" target="_blank">



--
----------------------------
Charles J. Burns
">



Archive powered by MHonArc 2.6.16.

§