puppet manifest/template code validation

37 views
Skip to first unread message

Paolo Supino

unread,
Mar 25, 2014, 3:46:44 AM3/25/14
to puppet...@googlegroups.com
Hi 

Being lazy and forgetful a while ago I wrote a small bash shell script that checks puppet manifests and ruby code embedded in templates.

I'm posting it to the group in hope that others will find it useful and suggest improvements... :-)






Paolo 

validate.sh

devzero2000

unread,
Mar 25, 2014, 6:45:46 AM3/25/14
to puppet...@googlegroups.com
Isn't better this one
http://projects.puppetlabs.com/projects/1/wiki/puppet_version_control
?

And for puppet module this one http://rspec-puppet.com/

Best Regards


>
>
>
>
>
>
> Paolo
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CA%2BB25By0Ckos94d6EybwOWYch2ds66S8atVvX-KtE4jOqdewvw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

Paolo Supino

unread,
Mar 25, 2014, 7:25:28 AM3/25/14
to puppet...@googlegroups.com
Hi 

Thanx for the links :-) Yes they are, but being a "little consultant" they are outside of my realm of implementation and integration... 







Paolo 



Garrett Honeycutt

unread,
Mar 25, 2014, 8:52:44 AM3/25/14
to puppet...@googlegroups.com
Hi,

I have a Rakefile[1] that lets you run 'rake validate' to validate
syntax of all manifests, templates, and ruby files. Here is an
example[2] of using Travis[3] to validate your files. In the example the
files must pass validation, style, and spec tests to be valid.

[1] -
https://github.com/ghoneycutt/puppet-module-skeleton/blob/master/Rakefile

[2] -
https://github.com/ghoneycutt/puppet-module-skeleton/blob/master/.travis.yml#L13

[3] - https://travis-ci.org/

Best regards,
-g

--
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658
Reply all
Reply to author
Forward
0 new messages