Hey Guys,
I just started using puppet and i like it, when i came across construct
"node <regexp> { }" I was expecting that whichever node (host) matches that
regexp will be exposed in the current scope using $name, but that was not
the case. Having that allows us to write node constructs like this:
====
node /web[0-9]{4}.*/ {
include webserver
if $name == "web1000.example.com" {
include not_serving
}
}
====
this removes a lot of noise (and repetition) from the manifest file. Having
said that I think whatsoever "regexp node construct" stores in $name by
default is not that useful. I have a tiny patch (created against 2.6.7, but
is valid for 2.6.8 too) for just that. Can this be the default behavior in
puppet?
attached is the patch.
- praddy
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" 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-dev?hl=en.
node_regexp.patch
Description: Binary data
