Thanks Noah and Adam.
Set node_name to what you want in /etc/chef/client.rb.
Well yeah, that’s what I’m trying to do
What I’ve learned is that chef-client has not gathered ohai
data before it loads this config file, so ohai[‘fqdn’] is
not available for munging in client.rb as such:
node_name ohai['fqdn'].downcase.gsub('domain.com', '')
Not a big deal there. We already use the chef-client cookbook
and can do the munging there in our wrapper for it.
Is the node name used as any sort of input data for that node’s
client key generation?
If so, obviously renaming our node objects is going to require
Or, write a library in a cookbook that is something like
# stuff, where @name is the node name
Then you can call it with:
… except client.rb.
On Mon, Jun 9, 2014 at 7:45 AM, Jeff Blaine <email@example.com
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:
Adam Jacob, Chief Dev Officer
T: (206) 619-7151 E: firstname.lastname@example.org mailto:email@example.com