Dear readers, How do I syntax debug the config files on the puppet master before I deploy them? My current problem is that server_list is to be an array, and I don''t know if I should write class { ''ntp'': server_list => $ntpServerList } or class { ''ntp'': server_list = $ntpServerList } How do I debug such a situation on puppet 3? Hugs, Sandra node "client1.example.com" { include common class { ''ntp'': server_list => $ntpServerList } } class common { include common::data } class common::data { $ntpServerList = [ ''ntp1.example.com'',''ntp2.example.com'',''ntp3.example.com'' ] } -- 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/-/wBOih0BkLQMJ. 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. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Did you ever try Gepetto (https://github.com/cloudsmith/geppetto)? At least in the coming version (3.0) will support Puppet 3. I really do recommend Gepetto since I''ve been working with it for more than a year now and it helped me a lot creating error free code. You should give it a try. There are also current beta releases available which (as far as I know) already do support Puppet 3. It''s available as an Eclipse plugin and as a standalone program. Cheers, Bernd From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] On Behalf Of Sandra Schlichting Sent: Freitag, 24. August 2012 11:52 To: puppet-users@googlegroups.com Subject: [Puppet Users] How to syntax debug in puppet 3? Dear readers, How do I syntax debug the config files on the puppet master before I deploy them? My current problem is that server_list is to be an array, and I don''t know if I should write class { ''ntp'': server_list => $ntpServerList } or class { ''ntp'': server_list = $ntpServerList } How do I debug such a situation on puppet 3? Hugs, Sandra node "client1.example.com" { include common class { ''ntp'': server_list => $ntpServerList } } class common { include common::data } class common::data { $ntpServerList = [ ''ntp1.example.com'',''ntp2.example.com'',''ntp3.example.com'' ] } -- 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/-/wBOih0BkLQMJ. To post to this group, send email to puppet-users@googlegroups.com<mailto:puppet-users@googlegroups.com>. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com<mailto:puppet-users+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Sandra Schlichting
2012-Aug-24 10:27 UTC
Re: [Puppet Users] How to syntax debug in puppet 3?
Hi Bernd> Did you ever try Gepetto (https://github.com/cloudsmith/geppetto)? At > least in the coming version (3.0) will support Puppet 3. I really do > recommend Gepetto since I’ve been working with it for more than a year > now and it helped me a lot creating error free code. You should give it a > try. There are also current beta releases available which (as far as I > know) already do support Puppet 3. It’s available as an Eclipse plugin and > as a standalone program. >Ok, so Gepetto is a plugin for Eclipse? I don''t suppose it works with either VI or emacs? Hugs, Sandra -- 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/-/oljsXv0_ayIJ. 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. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Hi Sandra, Yes, you may either use it as an Eclipse plugin or as a standalone program. There''s no link to vi or Emacs at all. I think I know what you mean. My absolutely favorite editor is vim. Normally I don''t need anything else but the command line and vim. However, when it''s about creating source code (Puppet, Java, whatever) I want to have the ability to see my errors while I''m typing and that''s why I then move to some GUI stuff like Eclipse. It saves me a lot of time. (Not to mention some other advantages like code formatting.) I know there are also command line tools for validating Puppet code. Maybe someone else from this list can provide more information. Cheers Bernd From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] On Behalf Of Sandra Schlichting Sent: Freitag, 24. August 2012 12:27 To: puppet-users@googlegroups.com Subject: Re: [Puppet Users] How to syntax debug in puppet 3? Hi Bernd Did you ever try Gepetto (https://github.com/cloudsmith/geppetto)? At least in the coming version (3.0) will support Puppet 3. I really do recommend Gepetto since I''ve been working with it for more than a year now and it helped me a lot creating error free code. You should give it a try. There are also current beta releases available which (as far as I know) already do support Puppet 3. It''s available as an Eclipse plugin and as a standalone program. Ok, so Gepetto is a plugin for Eclipse? I don''t suppose it works with either VI or emacs? Hugs, Sandra -- 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/-/oljsXv0_ayIJ. To post to this group, send email to puppet-users@googlegroups.com<mailto:puppet-users@googlegroups.com>. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com<mailto:puppet-users+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Juan Sierra Pons
2012-Aug-24 11:20 UTC
Re: [Puppet Users] How to syntax debug in puppet 3?
Hi I my 5 cents: I first use vim-puppet (syntax highlighting for puppet manifests in vim while creating my manifest) To create my manifests Then I use - puppet parser validate file.pp (Validate the syntax of one or more Puppet manifests). - puppet-lint file.pp (Check that your Puppet manifest conform to the style guide) this one must installed using gems package manager: gem install puppet-lint Usually inside a loop to check many files at a time Check all .pp files in a directory find -name ''*.pp'' | xargs -n 1 -t puppet parser validate find -name ''*.pp'' | xargs -n 1 -t puppet-lint Best regards -------------------------------------------------------------------------------------- Juan Sierra Pons juan@elsotanillo.net Linux User Registered: #257202 http://www.elsotanillo.net GPG key = 0xA110F4FE Key Fingerprint = DF53 7415 0936 244E 9B00 6E66 E934 3406 A110 F4FE -------------------------------------------------------------------------------------- 2012/8/24 Bernd Adamowicz <Bernd.Adamowicz@esailors.de>:> Hi Sandra, > > > > Yes, you may either use it as an Eclipse plugin or as a standalone program. > There’s no link to vi or Emacs at all. I think I know what you mean. My > absolutely favorite editor is vim. Normally I don’t need anything else but > the command line and vim. However, when it’s about creating source code > (Puppet, Java, whatever) I want to have the ability to see my errors while > I’m typing and that’s why I then move to some GUI stuff like Eclipse. It > saves me a lot of time. (Not to mention some other advantages like code > formatting.) > > > > I know there are also command line tools for validating Puppet code. Maybe > someone else from this list can provide more information. > > > > Cheers > > Bernd > > > > From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] > On Behalf Of Sandra Schlichting > Sent: Freitag, 24. August 2012 12:27 > To: puppet-users@googlegroups.com > Subject: Re: [Puppet Users] How to syntax debug in puppet 3? > > > > Hi Bernd > > > > Did you ever try Gepetto (https://github.com/cloudsmith/geppetto)? At least > in the coming version (3.0) will support Puppet 3. I really do recommend > Gepetto since I’ve been working with it for more than a year now and it > helped me a lot creating error free code. You should give it a try. There > are also current beta releases available which (as far as I know) already do > support Puppet 3. It’s available as an Eclipse plugin and as a standalone > program. > > Ok, so Gepetto is a plugin for Eclipse? > > > > I don''t suppose it works with either VI or emacs? > > > > Hugs, > > Sandra > > > > > > -- > 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/-/oljsXv0_ayIJ. > 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. > 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+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Sandra Schlichting
2012-Aug-24 11:58 UTC
Re: [Puppet Users] How to syntax debug in puppet 3?
> > Yes, you may either use it as an Eclipse plugin or as a standalone > program. >[snip] That sounds interesting. How do I do that? =) -- 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/-/8gwNyTeDmgsJ. 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. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Sandra Schlichting
2012-Aug-24 12:04 UTC
Re: [Puppet Users] How to syntax debug in puppet 3?
Dear Juan - puppet parser validate file.pp (Validate the syntax of one or more> Puppet manifests). > > - puppet-lint file.pp (Check that your Puppet manifest conform to the > style guide) this one must installed using gems package manager: gem > install puppet-lint >That''s exactly what I was looking for =) Check all .pp files in a directory> find -name ''*.pp'' | xargs -n 1 -t puppet parser validate > find -name ''*.pp'' | xargs -n 1 -t puppet-lint >Didn''t knew about the "-n 1" trick instead of making a loop =) Hugs, Sandra -- 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/-/psnPqXTYy4AJ. 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. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Sandra Schlichting
2012-Aug-24 12:26 UTC
Re: [Puppet Users] How to syntax debug in puppet 3?
> > I first use vim-puppet (syntax highlighting for puppet manifests in > vim while creating my manifest) To create my manifests >Btw. How do you install that? I have tried mkdir .vim cd .vim git clone https://github.com/rodjek/vim-puppet.git cd echo "set runtimepath+=$HOME/.vim/vim-puppet" > .vimrc -- 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/-/kajkXlfJkrMJ. 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. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
The author of vim-puppet says in the README that they use something called "pathogen" to manage their vim modules. I found this: https://github.com/tpope/vim-pathogen Otherwise, it looks like one would have to pick apart the innards on vim-puppet to understand it enough to install it by other means. Good like. I hope this helps. “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) ----- Original Message ----- From: "Sandra Schlichting" <littlesandra88@gmail.com> To: puppet-users@googlegroups.com Sent: Friday, August 24, 2012 8:26:49 AM Subject: Re: [Puppet Users] How to syntax debug in puppet 3? I first use vim-puppet (syntax highlighting for puppet manifests in vim while creating my manifest) To create my manifests Btw. How do you install that? I have tried mkdir .vim cd .vim git clone https://github.com/rodjek/vim-puppet.git cd echo "set runtimepath+=$HOME/.vim/vim-puppet" > .vimrc -- 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/-/kajkXlfJkrMJ . 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. 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 2012-24-08 13:58, Sandra Schlichting wrote:> Yes, you may either use it as an Eclipse plugin or as a standalone > program.. > > [snip] > > That sounds interesting. > > How do I do that? =) >The standalone Geppetto is downloadable from https://github.com/cloudsmith/geppetto/downloads (linux, windows, osx). To install it into an Eclipse as a plugin, see instructions in the FAQ - http://cloudsmith.github.com/geppetto/faq.html#2011/06/02/can-i-use-geppetto-in-eclipse The current release of Geppetto 2.2.1 supports Puppet 3.0. - henrik -- 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. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Juan Sierra Pons
2012-Aug-24 16:36 UTC
Re: [Puppet Users] How to syntax debug in puppet 3?
Hi I installed it from puppetlabs repositories (in debian): Package: vim-puppet Source: puppet Version: 2.7.19-1puppetlabs1 Architecture: all Maintainer: Puppet Labs <info@puppetlabs.com> Installed-Size: 332 Recommends: vim-addon-manager Conflicts: puppet (<< 2.7.19-1puppetlabs1) Section: admin Priority: optional Homepage: http://projects.puppetlabs.com/projects/puppet Description: syntax highlighting for puppet manifests in vim The vim-puppet package provides filetype detection and syntax highlighting for puppet manifests (files ending with ".pp"). Filename: pool/squeeze/main/p/puppet/vim-puppet_2.7.19-1puppetlabs1_all.deb MD5sum: 9a02b144f442b7980e419d26baac09b7 SHA1: 1ff9022b0f416a8cb38bbca3ad0eddbceadd6074 SHA256: bf64cfb4cf9c2711659db7d97c63b380290076c1008eb962c92b2b9b377de658 Size: 260222 So I suppose it must be packaged for other dists: CentOS, RedHat, etc Best regards -------------------------------------------------------------------------------------- Juan Sierra Pons juan@elsotanillo.net Linux User Registered: #257202 http://www.elsotanillo.net GPG key = 0xA110F4FE Key Fingerprint = DF53 7415 0936 244E 9B00 6E66 E934 3406 A110 F4FE -------------------------------------------------------------------------------------- -- 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. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 8/24/2012 6:01 AM, Dan White wrote:> The author of vim-puppet says in the README that they use something called "pathogen" to manage their vim modules. > > I found this: https://github.com/tpope/vim-pathogenIf vim is your primary editing environment install vim-pathogen, takes two minutes, and be done. Allows vim to load dirs out of ~/.vim/bundle/ and I usually git clone new vim plugins directly into it. Well worth the time to not dig through .vim/syntax|ftplugin|etc|etc directories. Ramin -- 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. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 08/24/2012 12:55:17 PM, Ramin K wrote:> > On 8/24/2012 6:01 AM, Dan White wrote: > > The author of vim-puppet says in the README that they use something called "pathogen" to manage their vim modules. > > > > I found this: https://github.com/tpope/vim-pathogen > > If vim is your primary editing environment install vim-pathogen, takes > two minutes, and be done. Allows vim to load dirs out of ~/.vim/bundle/ > and I usually git clone new vim plugins directly into it. Well worth the > time to not dig through .vim/syntax|ftplugin|etc|etc directories. > > RaminI plan to try it out. It looks like a good utility. “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 post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 08/24/2012 06:55 PM, Ramin K wrote:> On 8/24/2012 6:01 AM, Dan White wrote: >> The author of vim-puppet says in the README that they use something >> called "pathogen" to manage their vim modules. >> >> I found this: https://github.com/tpope/vim-pathogen > > If vim is your primary editing environment install vim-pathogen, > takes two minutes, and be done. Allows vim to load dirs out of > ~/.vim/bundle/ and I usually git clone new vim plugins directly into it. > Well worth the time to not dig through .vim/syntax|ftplugin|etc|etc > directories.Yeah. I use pathogen + syntastic. -- Jakov Sosic www.srce.unizg.hr -- 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. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.