- From: Noah Kantrowitz <
>
- To:
- Subject: [chef] Re: Possibilities for node_name in Chef client configuration
- Date: Mon, 9 Jun 2014 07:53:23 -0700
At the point the config is loaded, the name has no default value (or rather,
the default is nil). It is only later that the default value is inserted if
unset in the config
(
https://github.com/opscode/chef/blob/master/lib/chef/client.rb#L296). If you
want to fix this, your base best is just hardwire node_name in the config
file at bootstrap time based on some canonical name.
--Noah
On Jun 9, 2014, at 7:45 AM, Jeff Blaine
<
>
wrote:
>
The default client.rb setting for node_name is "what Ohai determined to
>
be the FQDN of the node"
>
>
In our environment, this causes a total mess. Due to many factors
>
outside of our control:
>
>
* node['fqdn'] for some nodes is of the form: foo
>
* node['fqdn'] for some nodes is of the form: foo.DOMAIN
>
* node['fqdn'] for some nodes is of the form: foo.domain
>
>
That's a real party when using knife, let me tell you.
>
>
Because of this, we clearly want to normalize our node *object* names.
>
>
How does one reference the current node object in client.rb so that I
>
can effectively do something like:
>
>
def site_normalize
>
# stuff
>
end
>
>
node_name site_normalize(the_node_fqdn)
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail
Archive powered by MHonArc 2.6.16.