Dan White
2013-Apr-11 15:22 UTC
[Puppet Users] puppet-lint -- learning stuff about style but also generating questions
Here''s one I learned: I originally had # Ensure /etc/hosts contains the basics host { "${fqdn}": host_aliases => $hostname, ip => $ipaddress, } And thru some trial and error, got down to this (which puppet-lint does not gripe about) # Ensure /etc/hosts contains the basics host { $fqdn: host_aliases => $hostname, ip => $ipaddress, } Now for a question: puppet-lint does not like template files at all. I keep getting this: ERROR: Syntax error (try running `puppet parser validate <file>`) My first thought is to ignore template files. “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
llowder
2013-Apr-11 17:53 UTC
[Puppet Users] Re: puppet-lint -- learning stuff about style but also generating questions
On Thursday, April 11, 2013 10:22:54 AM UTC-5, Ygor wrote:> > Here''s one I learned: > > I originally had > > # Ensure /etc/hosts contains the basics > host { "${fqdn}": > host_aliases => $hostname, > ip => $ipaddress, > } > > And thru some trial and error, got down to this (which puppet-lint does > not gripe about) > > # Ensure /etc/hosts contains the basics > host { $fqdn: > host_aliases => $hostname, > ip => $ipaddress, > } > > Now for a question: > > puppet-lint does not like template files at all. > I keep getting this: ERROR: Syntax error (try running `puppet parser > validate <file>`) > > My first thought is to ignore template files. > >puppet-lint is designed to lint puppet manifests, not the templates. The templates are a big mix of random text with scattered rubyisms.> “Sometimes I think the surest sign that intelligent life exists elsewhere > in the universe is that none of it has tried to contact us.” > Bill Waterson (Calvin & Hobbes) > >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Dan White
2013-Apr-11 23:06 UTC
Re: [Puppet Users] puppet-lint -- learning stuff about style but also generating questions
On Apr 11, 2013, at 1:53 PM, llowder wrote:> On Thursday, April 11, 2013 10:22:54 AM UTC-5, Ygor wrote: > Now for a question: > > puppet-lint does not like template files at all. > I keep getting this: ERROR: Syntax error (try running `puppet parser validate <file>`) > > My first thought is to ignore template files. > > > puppet-lint is designed to lint puppet manifests, not the templates. The templates are a big mix of random text with scattered rubyisms.In the immortal words of Homer Simpson: “D-oh!” I shoulda thunka that. Thanks for pointing it out. -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Jakov Sosic
2013-Jul-01 16:55 UTC
Re: [Puppet Users] puppet-lint -- learning stuff about style but also generating questions
On 04/11/2013 05:22 PM, Dan White wrote:> puppet-lint does not like template files at all. > I keep getting this: ERROR: Syntax error (try running `puppet parser validate <file>`)puppet-lint checks adherence to codestyle. For erb''s you can check syntax with something like this: $ erb -x -T - mytemplate.erb | ruby -c -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.