The main reason I separate title from namevar is so when I have references to the exec they stay consistent - but the command & args can be updated independently. This matters more when I have references that cross file boundaries.
ken. On Sat, Jun 18, 2011 at 7:35 PM, vagn scott <vagnsc...@gmail.com> wrote: > On 06/18/2011 10:31 AM, Markus Falb wrote: >> >> On 18.6.2011 05:30, vagn scott wrote: >> >> >>> >>> or you can do what I do and pipe that archive into tar: >>> >>> exec { "true $title&& wget -O - $upstream | tar xzf - --xform >>> 's,wordpress/,,'": >>> cwd => "$top", >>> creates => "$top/license.txt", >>> before => File[ "$top/setup.mysql" ], >>> } >>> >>> the reason for the 'true $title&&' part is >>> that I want to be able to use this exec multiple times (it is in a >>> defined class). >>> So I need to get the $title in there so puppet doesn't think it is >>> a duplicate definition. >>> >> >> You can separate the title from the actual command >> >> exec { "uniqe title maybe with $title in it": >> command => "wget...", >> ... >> } >> >> > > And then I have to make up a title that won't collide > with another title somewhere else. Also, I lose a line > of vertical space on the screen, and I have to go > looking for what the exec is doing, instead of it being > on the first line. Shortcut operators don't slow me > down at all. Those are my tradeoffs, and why > I chose this style. YMMV. > > But, since you mentioned it: Is it so arcane a practice that > I should avoid it for the sake of people reading my code? > > -- > vagn > > -- > 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. > > -- 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.