Yeah, using the path:username is fine but a big fugly. What I'd like is this:
foo { "meaningless_name": target => "/some/path", username => "username" } Then, in foo.rb, I'd like to be able to say: :namevar = "#{target}:#{username} This would effectively throw away 'meaningless_name' and allow me to have proper uniqueness across files. So, you could have: /some/path + foo /some/path + bar /some/other/path + foo But not another '/some/path + foo' The workaround is easy enough but it makes for some darn unreadable manifest-fu. Thanks, Trevor On Fri, Mar 4, 2011 at 2:15 PM, Markus Roberts <mar...@puppetlabs.com> wrote: > Trevor -- > > It should be. The way to do it would be to set up a naming scheme that let > the key fields be inferred from the title (e.g. something like "username in > path" or the "path:username" that you gave as an example) with a regular > expression to parse them (e.g. /^([a-zA-Z_0-9+) in (.+)$/ or > /^(.*):([a-zA-Z_0-9]+)$/) and then you'd have the option of specifying the > title as the "canonical" composite name var or of having the title be an > arbitrary non-matching string and getting the key fields from the body). > > While this technically answers your question, I suspect it probably raises > ~3 more; at least, that's what always happened to me when we were first > exploring this space, and Dan followed a similar trajectory as I recall. > Feel free to ask them as they occur to you. > > -- Markus > ----------------------------------------------------------- > When in trouble or in doubt, run in circles, > scream and shout. -- 1920's parody of the > maritime general prudential rule > ------------------------------------------------------------ > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To post to this group, send email to puppet-dev@googlegroups.com. > To unsubscribe from this group, send email to > puppet-dev+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-dev?hl=en. > -- Trevor Vaughan Vice President, Onyx Point, Inc (410) 541-6699 tvaug...@onyxpoint.com -- This account not approved for unencrypted proprietary information -- -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to puppet-dev@googlegroups.com. To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.