summaryrefslogtreecommitdiff
path: root/lib/chef/data_collector.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@chef.io>2016-11-03 10:01:43 -0700
committerdanielsdeleo <dan@chef.io>2016-11-03 13:53:25 -0700
commit49cc8b15d99216c5fb55b690e8cd22d22e5f359f (patch)
tree7b650979d7f82f773045b33adfc1a43c00d6a18e /lib/chef/data_collector.rb
parent34d2b287c6a7ee0afb303b49054a25fd96f0a30a (diff)
downloadchef-49cc8b15d99216c5fb55b690e8cd22d22e5f359f.tar.gz
Enable data collector w/o token for solo, but require explicit URL
Third-party data collector implementations are supported and may not require a token for authentication. Therefore we must allow the case where the token is nil in Chef Solo mode. To reduce the chance that the data collector is accidentally enabled, only set the data collector URL to a default value in Chef Client mode. Signed-off-by: Daniel DeLeo <dan@chef.io>
Diffstat (limited to 'lib/chef/data_collector.rb')
-rw-r--r--lib/chef/data_collector.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/chef/data_collector.rb b/lib/chef/data_collector.rb
index cf860d81e2..b92e9c122f 100644
--- a/lib/chef/data_collector.rb
+++ b/lib/chef/data_collector.rb
@@ -55,8 +55,7 @@ class Chef
return false
end
if solo? && !token_auth_configured?
- Chef::Log.debug("Data collector token must be configured in solo mode, disabling data collector")
- return false
+ Chef::Log.debug("Data collector token must be configured to use Chef Automate data collector with Chef Solo")
end
if !solo? && token_auth_configured?
Chef::Log.warn("Data collector token authentication is not recommended for client-server mode" \