On 9 March 2012 09:58, Garrett Honeycutt <[email protected]> wrote:

> On 3/8/12 4:28 PM, John Warburton wrote:
> > 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
>


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
> }
>
>
Thanks to an off list discussion, my problem was really with a line that
looked like "%post --logfile /root/ks-postinstall.log" and the "-P" in the
pre-commit hook told erb to ignore lines starting with a "%" for checking

I have updated the erb checks in
https://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Version_Controlto
include "-P"

Thanks Garrett

John

-- 
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.

Reply via email to