summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-10-13 13:03:00 -0700
committerTim Smith <tsmith84@gmail.com>2020-10-13 13:03:00 -0700
commitf4a38b8194dfd0c60c85c24bbb76e437179854d1 (patch)
treec9067bc1501bac9edb0c3ed310e7f604641d31c1
parent87214d97eb3f18bc45482ec3454ce40d8193d359 (diff)
downloadchef_config.tar.gz
Lazy node.name to avoid failureschef_config
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/resource/chef_client_config.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/resource/chef_client_config.rb b/lib/chef/resource/chef_client_config.rb
index ec3fa40d1a..4a4e8e4b1e 100644
--- a/lib/chef/resource/chef_client_config.rb
+++ b/lib/chef/resource/chef_client_config.rb
@@ -119,7 +119,7 @@ class Chef
property :node_name, [String, NilClass], # this accepts nil so people can disable the default
description: "The name of the node. This determines which configuration should be applied and sets the `client_name`, which is the name used when authenticating to a #{ChefUtils::Dist::Server::PRODUCT}. If this value is not provided #{ChefUtils::Dist::Infra::PRODUCT} will use the node's FQDN as the node name. Leaving this setting blank and letting the client assign the FQDN of the node as the node_name during each #{ChefUtils::Dist::Infra::PRODUCT} run is recommended.",
- default: node.name,
+ default: lazy { node.name },
default_description: "The `node.name` value. Hard coding this value in the client.rb avoids logic within #{ChefUtils::Dist::Server::PRODUCT} that performs DNS lookups and may fail in the event of a DNS outage. To skip this default value and instead use the built-in #{ChefUtils::Dist::Server::PRODUCT} logic, set this property to `nil`"
property :chef_server_url, String,