|| at Aug 31, 2012 at 5:40 pm
Thanks for the reply KW, but thats not quite what I was asking. Heres the
relevant section of the template:
<% if @hostname == "foo" %>
# Provides UDP syslog reception
<% end %>
So you can see it lives outside of a <% %> block.
This part: "*.notice;news.none;cron.none @loghost:514*" *should be a
literal string. Its a standard rsyslog configuration. "Loghost" is the
actual hostname of a host in our network that we send all of our servers'
syslogs to. In other words, I don't want it to be evaluated as ERB code.
So how can I have puppet/the template engine ignore the '@' symbol and
treat it as a literal string?
On Friday, August 31, 2012 11:21:08 AM UTC-4, Krzysztof Wilczynski wrote:
I am not sure how your template looks like, or how do you render it, but
try to avoid putting anything with @ into a <%= %> block. It should just
matti@acrux ~ $ irb
p ERB.new('*.notice;news.none;cron.none @<%= host
p ERB.new('*.notice;news.none;cron.none @<%= @host
matti@acrux ~ $ cat | puppet apply --noop
notice inline_template('*.notice;news.none;cron.none @<%= @hostname
%>:514') notice: Scope(Class[main]):
notice: Finished catalog run in 0.03 seconds
matti@acrux ~ $
On Friday, 31 August 2012 15:09:17 UTC+1, banjer wrote:
I have a template named rsyslog.conf.erb, and the puppet agents seem to
be choking on this:
The agents report an error of ": bad URI(is not URI?): " followed by a
bunch of jargon. I'm pretty sure its the literal '@' symbol that its
trying to evaluate as erb code. How can I escape this @ symbol so its a
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/8e0XGAVVVeIJ.
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to email@example.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.