On Sat, Sep 10, 2011 at 5:36 PM, Jon Forrest <nob...@gmail.com> wrote:

> We use puppet to distribute named zone files, like many
> of you do. We use git to maintain these files, which are
> then pulled by the puppet master machine. These zone files are
> actually puppet template .erb files.
>
> The other day, I made a mistake which resulted in some zone
> files with syntax errors in them. Puppet faithfully distributed
> the erroneous zone files to the name servers, which killed them.
>
> To prevent this from happening again, I want to be able to
> somehow expand the template files and run named-checkzone
> as part of a git pre-commit hook. I want this expansion to
> occur without making a normal puppet run so that the bad
> files won't get distributed.
>
> Can anybody point me to a technique for doing this?
>


git cat-file blob :0:$indexfile | erb -x -T - | ruby -c 2> $error_msg >
/dev/null ;

from:

http://projects.puppetlabs.com/projects/1/wiki/Puppet_Version_Control

should get you going.




>
> Cordially,
> Jon Forrest
>
> --
> 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+unsubscribe@**
> googlegroups.com <puppet-users%2bunsubscr...@googlegroups.com>.
> For more options, visit this group at http://groups.google.com/**
> group/puppet-users?hl=en<http://groups.google.com/group/puppet-users?hl=en>
> .
>
>


-- 
Nigel Kersten
Product Manager, Puppet Labs

*Join us for **PuppetConf *
<http://www.bit.ly/puppetconfsig>
Sept 22/23 Portland, Oregon, USA.
*
*

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