diff options
author | Luke Kanies <luke@madstop.com> | 2009-04-18 21:23:10 -0500 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-04-22 03:27:58 +1000 |
commit | 4e0de3881b55a728ee54e1cab5d3b9a6ab52a5a9 (patch) | |
tree | cbfc5497e1bf20d68c36f3522b800dd58301f897 /lib | |
parent | c1f562dc6e6b58a2de504019b7ad8381da57e2cb (diff) | |
download | puppet-4e0de3881b55a728ee54e1cab5d3b9a6ab52a5a9.tar.gz puppet-4e0de3881b55a728ee54e1cab5d3b9a6ab52a5a9.tar.xz puppet-4e0de3881b55a728ee54e1cab5d3b9a6ab52a5a9.zip |
Partially fixing #1765 - node searching supports strict hostname checking
With the new 'strict_hostname_checking' option enabled,
the compiler will only search for the literal certificate
name in its list of nodes.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/defaults.rb | 5 | ||||
-rw-r--r-- | lib/puppet/node.rb | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb index fcd4346fb..9ec26edf3 100644 --- a/lib/puppet/defaults.rb +++ b/lib/puppet/defaults.rb @@ -416,7 +416,10 @@ module Puppet }, :rrdgraph => [false, "Whether RRD information should be graphed."], :rrdinterval => ["$runinterval", "How often RRD should expect data. - This should match how often the hosts report back to the server."] + This should match how often the hosts report back to the server."], + :strict_hostname_checking => [false, "Whether to only search for the complete + hostname as it is in the certificate when searching for node information + in the catalogs."] ) self.setdefaults(:puppetd, diff --git a/lib/puppet/node.rb b/lib/puppet/node.rb index 5782c14fb..263aaf694 100644 --- a/lib/puppet/node.rb +++ b/lib/puppet/node.rb @@ -79,6 +79,10 @@ class Puppet::Node # Calculate the list of names we might use for looking # up our node. This is only used for AST nodes. def names + if Puppet.settings[:strict_hostname_checking] + return [name] + end + names = [] # First, get the fqdn |