Hi,
Works fine for me:
matti@acrux ~ $ cat > test.erb
*.notice;news.none;cron.none @loghost:514
<% if @hostname == "foo" %>
# Provides UDP syslog reception
$ModLoad imudp.so
$UDPServerRun 514
<% end %>
matti@acrux ~ $ sed -i 's/foo/acrux/' test.erb
matti@acrux ~ $ cat | puppet apply
file { '/tmp/test.txt':
content => template('/tmp/test.erb')
}
notice: /Stage[main]//File[/tmp/test.txt]/ensure: defined content as '{md5}c3230100f527db4f0fe50e200ed99fe9'
notice: Finished catalog run in 0.06 seconds
matti@acrux ~ $ cat /tmp/test.txt
*.notice;news.none;cron.none @loghost:514
# Provides UDP syslog reception
$ModLoad imudp.so
$UDPServerRun 514
matti@acrux ~ $
KW