Help me out here, please.
I believe I understand the descriptions given by both sides.
What I do not understand is "why is it a concern ?"
How do you plan to use "namevar" that makes this clarification important to you ?
“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: "Gary Larizza" <
ga...@puppetlabs.com>
To:
puppet...@googlegroups.com
Sent: Wednesday, December 5, 2012 4:15:17 PM
Subject: Re: [Puppet Users] Slight oversight in the type documentation
Gotcha,
That would probably be a good ticket for our docs project in Redmine -->
http://projects.puppetlabs.com/projects/puppet-docs
On Wed, Dec 5, 2012 at 1:14 PM, Ellison Marks <
gty...@gmail.com > wrote:
Ah, point taken about using namevars.
As to the documentation, it lists the namevar, but only where it differs from "name". There are a bunch of types, cron and user to name two, whose namevar is the "name" parameter, but there's no indication in the doc that this is the case. In fact, for these types, there's no indication that they have any namevar at all.
On Wednesday, December 5, 2012 1:08:27 PM UTC-8, Gary Larizza wrote:
On Wed, Dec 5, 2012 at 1:01 PM, Ellison Marks <
gty...@gmail.com > wrote:
I read that bit. It doesn't identify a default namevar, nor indicate that the "name" parameter is special. Again, maybe it's common sense, but having it spelled out explicitly can't be a bad thing. Also, I dispute that namevars are only important to developers (assuming by developer they mean someone writing a new puppet type). I can use them to save typing when writing a manifest.
Check the type reference again - I'm seeing the Namevar in bold next to the attribute that is the namevar (
http://docs.puppetlabs.com/ references/latest/type.html# exec ). Are you seeing something different?
The latter part I would caution against. Consider the situation where you use the namevar in an exec for its 'command' attribute:
exec { '/bin/somecommand -f -a':
refreshonly => true,
}
file {'/var/tmp/foo':
notify => Exec['/bin/somecommand -f -a'],
}
If, in the future, you realize that you need to change the exec resource, now you have to change everything that REFERENCES IT too (since references use the title). I hit this pretty late in the game in my old job, and it became a bit tedious.
On Wednesday, December 5, 2012 12:55:16 PM UTC-8, Ygor wrote:
The info you are asking for is at the top of the Type Reference page:
The namevar is the parameter used to uniquely identify a type instance. This is the parameter that gets assigned when a string is provided before the colon in a type declaration. In general, only developers will need to worry about which parameter is the namevar.