On 3/8/12 4:28 PM, John Warburton wrote:
> Hi
>
> I am scratching my head on this not being a ruby person...
>
> I am turning my kickstart files into templates, but am having issues
> with percent signs in free form text. This returns a syntax error:
> %post
>
> OK, fine , let me escape it:
>
> %%post
>
> No error, but the end result is
> %%post
>
> Not quite what I wanted
>
> I'm missing something blindingly obvious - can someone point me to it? :-)
>
> Thanks
>
> John
John,
What is the error that you are receiving?
ERB should not have any problems with percent signs in a template. I use
the following bash function to help me with syntax checking.
# puppet template syntax checking
function pt()
{
if [ -z $1 ]; then
echo "usage: pt <puppet_template_file.erb>"
return;
fi
/usr/bin/erb -P -x -T '-' $1 | /usr/bin/ruby -c
}
-g
--
Garrett Honeycutt
206.414.8658
http://puppetlabs.com
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.