Those hooks are the gross syntax checks to which he initially referred.

On Fri, Jul 29, 2011 at 9:49 AM, Greg Hellings <ghelli...@spokeo.com> wrote:

> Have you looked at using these?
> projects.puppetlabs.com/projects/1/wiki/Puppet_Version_Control
>
> --
> Greg
>
>
> On Fri, Jul 29, 2011 at 6:33 AM, Lars Kellogg-Stedman <lar...@gmail.com>wrote:
>
>> If anyone out there follows Serverfault, this is a duplicate of
>> http://goo.gl/CTS2u.  I'm hoping there are some subject matter experts
>> here :).
>>
>> I am trying to place some sanity checks (currently as git pre-commit
>> hooks) in our configuration repository to avoid committing invalid Puppet
>> configurations.  I'm having a surprising amount of trouble coming up with a
>> way to effectively validate the configuration.  My obvious first choice was
>> "puppet parser validate ...", which does some gross syntax checks (unmatched
>> quotes and brackets and so forth) but doesn't throw errors on things like
>> this:
>>
>>   file { 'somefile':
>>     requires => Service['someservice']
>>   }
>>
>> (where 'requires' should be 'require'), nor does it notice problems like
>> this:
>>
>>   sdlflsjlksdf { 'myname': }
>>
>> (where 'sdlflsjlksdf' isn't defined anywhere).
>>
>> Some folks have suggested "puppet master --compile ...", but this really,
>> reallly wants to fix permissions all over the place on directories that are
>> used by Puppet.  I have also tried "puppet apply --noop", but this still
>> tries to stat() any files referenced in the manifests, which means it will
>> fail with permission errors if it tries to stat() a file or directory that
>> is not accessible to a non-root user.  Does anyone here have suggestions for
>> effectively performing more aggressive syntax checks than those offered by
>> "puppet parser validate"?
>>
>> -- Lars
>>
>>  --
>> 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/-/cpzgsk5X2fgJ.
>> To post to this group, send email to puppet-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to