Another point of disparity between how I see others write Puppet manifests and the Best Practice that I''ve adopted at my institution is the use of quoting. In Puppet, you can get away with not quoting values or references if there isn''t a special character or a keyword being used (e.g. package { openssh: ...} or User[agirl]). However, even though that is possible, to make things explicitly clear which values are Puppet native values (true, false, absent, present, etc) and non-native values (usernames, strings, package names, etc), we''ve been using quotes in all situations where the value is non-native for the sake on consistency (otherwise, a reference name isn''t quoted unless it has a space or other special character, in which case it is quoted, and therefore when skimming a manifest, things don''t look consistent). Discussion? <https://reductivelabs.com/trac/puppet/wiki/PuppetBestPractice#syntax-and-formatting>
On 11 May , 2007, at 12:32, Digant C Kasundra wrote:> Another point of disparity between how I see others write Puppet > manifests > and the Best Practice that I''ve adopted at my institution is the > use of > quoting. > > In Puppet, you can get away with not quoting values or references > if there > isn''t a special character or a keyword being used (e.g. package > { openssh: > ...} or User[agirl]). > > However, even though that is possible, to make things explicitly clear > which values are Puppet native values (true, false, absent, > present, etc) > and non-native values (usernames, strings, package names, etc), > we''ve been > using quotes in all situations where the value is non-native for > the sake > on consistency (otherwise, a reference name isn''t quoted unless it > has a > space or other special character, in which case it is quoted, and > therefore > when skimming a manifest, things don''t look consistent). > > Discussion?I don''t think it''s wise (nor very possible) that can retract the leniency in the syntax and start forcing an error for that, but I think it''s a very good idea to observe this convention stylistically for just the reasons you state.
--On May 11, 2007 3:19:46 PM -0400 "Benjamin C. Kite" <ben@reductivelabs.com> wrote:> I don''t think it''s wise (nor very possible) that can retract the > leniency in the syntax and start forcing an error for that, but I > think it''s a very good idea to observe this convention stylistically > for just the reasons you state.Very well put. I don''t think we have to retract it code-wise, but just a convention to observe. I want to make sure I''m getting somewhat of a blessing from the Puppet community the things I''m proselytizing as "best practice."
On 11 May , 2007, at 15:31, Digant C Kasundra wrote:> --On May 11, 2007 3:19:46 PM -0400 "Benjamin C. Kite" > <ben@reductivelabs.com> wrote: > >> I don''t think it''s wise (nor very possible) that can retract the >> leniency in the syntax and start forcing an error for that, but I >> think it''s a very good idea to observe this convention stylistically >> for just the reasons you state. > > Very well put. I don''t think we have to retract it code-wise, but > just a > convention to observe. I want to make sure I''m getting somewhat of a > blessing from the Puppet community the things I''m proselytizing as > "best > practice."I heartily endorse this particular practice.
On 5/11/07, Benjamin C. Kite <ben@reductivelabs.com> wrote:> > > On 11 May , 2007, at 15:31, Digant C Kasundra wrote: > > > --On May 11, 2007 3:19:46 PM -0400 "Benjamin C. Kite" > > <ben@reductivelabs.com> wrote: > > > >> I don''t think it''s wise (nor very possible) that can retract the > >> leniency in the syntax and start forcing an error for that, but I > >> think it''s a very good idea to observe this convention stylistically > >> for just the reasons you state. > > > > Very well put. I don''t think we have to retract it code-wise, but > > just a > > convention to observe. I want to make sure I''m getting somewhat of a > > blessing from the Puppet community the things I''m proselytizing as > > "best > > practice." > > I heartily endorse this particular practice.If there''s anyone on the fence about this, the tipping-point would definitely be syntax highlighting for .pp files. It makes reading them SO much easier (especially when there are lots of resource references in a parameter). -Blake _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
On May 14, 2007, at 7:50 PM, Blake B wrote:> I heartily endorse this particular practice.I go to all this effort to make it so you can use unquoted words... ;)> If there''s anyone on the fence about this, the tipping-point would > definitely be syntax highlighting for .pp files. It makes reading > them SO much easier (especially when there are lots of resource > references in a parameter).The syntax highligher should be upgradeable to use the quoted color for all rvalues. I haven''t even upgraded it to support single quotes, tho; it could use some love in general. -- Zeilinger''s Fundamental Law: There is no Fundamental Law. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
--On Tuesday, May 15, 2007 11:39:36 -0500 Luke Kanies <luke@madstop.com> wrote:>> I heartily endorse this particular practice. > > I go to all this effort to make it so you can use unquoted words... ;)Sorry, Luke. :) For me, it came down to a need of consistency taking precidence over convenience. "Just because you *can* leave off quotes doesn''t mean you *should*" is what I tell the kids these days.