Issue #16946 has been updated by eric sorenson.

Status changed from Unreviewed to Needs More Information
Assignee set to Nico Schottelius

Nico I spent some time trying to reproduce this and was unable to.

Note that your first example is not a regex, it's a glob, and wouldn't match 
the hostname mongo-hw01 - you'd need to have  `node /mongo-hw.*/` to do that.

In your second example the node stanza needs to have the node identity returned 
by `puppet agent --configprint certname` in the agent/master case or `facter 
fqdn` in the local-only `puppet apply` mode as in this example:

<pre>
[[email protected] ~/Sandbox]% cat 16946-regex.pp 

node /cipat.r/ { notice("regex won") }
node 'cipater.local' { notice("nodename won") }

[[email protected] ~/Sandbox]% puppet apply ./16946-regex.pp
Notice: Scope(Node[cipater.local]): nodename won
Notice: Finished catalog run in 0.03 seconds
</pre>

Please close the ticket if you agree with this analysis or assign it back to me 
if I have misunderstood or misdiagnosed this problem.
----------------------------------------
Bug #16946: Regular Expressions take precendence over direct node specifications
https://projects.puppetlabs.com/issues/16946#change-77645

Author: Nico Schottelius
Status: Needs More Information
Priority: Normal
Assignee: Nico Schottelius
Category: 
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


Having the following two node definitions:

node /^mongo-hw-*/ inherits basenodedhcp {
   some-stuff
}

node 'mongo-hw01' inherits basenodedhcp {
   the-real-stuff
}

On mongo-hw01 some-stuff will be applied, not the-real-stuff.

Expected behaviour:

- Either prefer explict node naming
- Or throw an error if node is matched twice



-- 
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