summaryrefslogtreecommitdiff
path: root/lib/chef/data_collector.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@chef.io>2016-10-24 18:13:24 -0700
committerdanielsdeleo <dan@chef.io>2016-11-02 08:06:38 -0700
commitbc596e0e0e3302dd013565943b1aa91f17fffc8f (patch)
tree25671021adf88f092c25c7f588dd824573219d79 /lib/chef/data_collector.rb
parentb95fce9f28693aa09dd0d37742063027596f6847 (diff)
downloadchef-bc596e0e0e3302dd013565943b1aa91f17fffc8f.tar.gz
Enable the data collector automatically
Signed-off-by: Daniel DeLeo <dan@chef.io>
Diffstat (limited to 'lib/chef/data_collector.rb')
-rw-r--r--lib/chef/data_collector.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/chef/data_collector.rb b/lib/chef/data_collector.rb
index f07f81c846..5d947d0ee8 100644
--- a/lib/chef/data_collector.rb
+++ b/lib/chef/data_collector.rb
@@ -32,6 +32,9 @@ class Chef
# == Chef::DataCollector
# Provides methods for determinine whether a reporter should be registered.
class DataCollector
+
+ # TODO: this probably should be false if running chef-solo and the user has
+ # not set a server_url, but maybe it will behave ok with the default?
def self.register_reporter?
Chef::Config[:data_collector][:server_url] &&
!Chef::Config[:why_run] &&
@@ -271,7 +274,9 @@ class Chef
Chef::Log.error(msg)
raise
else
- Chef::Log.warn(msg)
+ # Make the message non-scary for folks who don't have automate:
+ msg << " (This is normal if you do not have Chef Automate)"
+ Chef::Log.info(msg)
end
end