Issue #7079 has been updated by Dan Bode.

below is a reasonable workaround:

<pre>
puppet resource_type search '^foo$' --manifest /tmp/foo.pp 
[
  {
    "name": "foo",
    "line": 4,
    "type": "hostclass",
    "file": "/tmp/foo.pp"
  },
  {
    "name": "foo",
    "line": 1,
    "type": "node",
    "file": "/tmp/foo.pp"
  }
]
</pre>
----------------------------------------
Bug #7079: resource_type find does not handle duplicates names
https://projects.puppetlabs.com/issues/7079

Author: Dan Bode
Status: Unreviewed
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 
Keywords: 
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.

Reply via email to