diff options
author | John Ferlito <johnf@inodes.org> | 2008-03-14 13:58:24 +1100 |
---|---|---|
committer | John Ferlito <johnf@inodes.org> | 2008-03-14 13:58:24 +1100 |
commit | 388cf7c3df7ce26e953949ed6fe63d76cbbb3691 (patch) | |
tree | e33337e22037ac63d56b6e314792a0bbd68c478c /lib | |
parent | 872ced7126877dd74a051d8b38ae29920ad0d9b2 (diff) | |
download | puppet-388cf7c3df7ce26e953949ed6fe63d76cbbb3691.tar.gz puppet-388cf7c3df7ce26e953949ed6fe63d76cbbb3691.tar.xz puppet-388cf7c3df7ce26e953949ed6fe63d76cbbb3691.zip |
Regression in :node_name functionality
When :node_name="cert" is specified the 'hostname' fact should be set to the SSL certificate common name instead of the results from facter. I've extended this to also set 'domain' and 'fqdn' since that makes a lot of sense to me. This fixes a regression introduced in SVN#1673
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/defaults.rb | 4 | ||||
-rw-r--r-- | lib/puppet/network/handler/master.rb | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb index e0225803a..407a47d07 100644 --- a/lib/puppet/defaults.rb +++ b/lib/puppet/defaults.rb @@ -327,8 +327,8 @@ module Puppet :masterport => [8140, "Which port puppetmasterd listens on."], :parseonly => [false, "Just check the syntax of the manifests."], :node_name => ["cert", "How the puppetmaster determines the client's identity - and sets the 'hostname' fact for use in the manifest, in particular - for determining which 'node' statement applies to the client. + and sets the 'hostname', 'fqdn' and 'domain' facts for use in the manifest, + in particular for determining which 'node' statement applies to the client. Possible values are 'cert' (use the subject's CN in the client's certificate) and 'facter' (use the hostname that the client reported in its facts)"], diff --git a/lib/puppet/network/handler/master.rb b/lib/puppet/network/handler/master.rb index 8d84fe8b8..3e004046e 100644 --- a/lib/puppet/network/handler/master.rb +++ b/lib/puppet/network/handler/master.rb @@ -81,6 +81,8 @@ class Puppet::Network::Handler clientip = facts["ipaddress"] if Puppet[:node_name] == 'cert' if name + facts["fqdn"] = client + facts["hostname"], facts["domain"] = client.split('.', 2) client = name end if ip |