# File lib/puppet/node.rb, line 79
 79:   def names
 80:     return [name] if Puppet.settings[:strict_hostname_checking]
 81: 
 82:     names = []
 83: 
 84:     names += split_name(name) if name.include?(".")
 85: 
 86:     # First, get the fqdn
 87:     unless fqdn = parameters["fqdn"]
 88:       if parameters["hostname"] and parameters["domain"]
 89:         fqdn = parameters["hostname"] + "." + parameters["domain"]
 90:       else
 91:         Puppet.warning "Host is missing hostname and/or domain: #{name}"
 92:       end
 93:     end
 94: 
 95:     # Now that we (might) have the fqdn, add each piece to the name
 96:     # list to search, in order of longest to shortest.
 97:     names += split_name(fqdn) if fqdn
 98: 
 99:     # And make sure the node name is first, since that's the most
100:     # likely usage.
101:     #   The name is usually the Certificate CN, but it can be
102:     # set to the 'facter' hostname instead.
103:     if Puppet[:node_name] == 'cert'
104:       names.unshift name
105:     else
106:       names.unshift parameters["hostname"]
107:     end
108:     names.uniq
109:   end