Issue #7079 has been updated by Nan Liu.
I don't seem to have an issue when I run this via irb:
Puppet::Face[:resource_type,:current].search('*').collect{|x| x.type}
=> [:hostclass, :node]
Puppet::Face[:resource_type,:current].search('demo').collect{|x| x.type}
=> [:hostclass, :node]
Nan
----------------------------------------
Bug #7079: resource_type find does not handle duplicates names
https://projects.puppetlabs.com/issues/7079#change-67001
Author: Dan Bode
Status: Accepted
Priority: Low
Assignee: Nan Liu
Category: documentation
Target version:
Affected Puppet version:
Keywords: faces resource_type
Branch:
if a resource name has duplicates (ie: both a node and a class), then only one
thing matches
Example:
The following code has both a node and a class named foo:
<pre>
[root@mypuppetmaster manifests]# cat /tmp/foo.pp
node foo {
}
class foo {
}
</pre>
when we try to find foo, the existence of the class will mask the existence of
the node.
<pre>
[root@mypuppetmaster manifests]# puppet resource_type find foo --manifest
/tmp/foo.pp
{
"name": "foo",
"line": 5,
"type": "hostclass",
"file": "/tmp/foo.pp"
}
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.