diff --git a/files/default/vendor/chef-automate/fetcher.rb b/files/default/vendor/chef-automate/fetcher.rb index fbffe2c2..b00e6831 100644 --- a/files/default/vendor/chef-automate/fetcher.rb +++ b/files/default/vendor/chef-automate/fetcher.rb @@ -28,6 +28,12 @@ def self.resolve(target) url = URI(dc[:server_url]) url.path = profile_path profile_fetch_url = url.to_s + + raise 'No data-collector token set, which is required by the chef-automate fetcher. ' \ + 'Set the `data_collector.token` configuration parameter in your client.rb ' \ + 'or use the "chef-server-automate" reporter which does not require any ' \ + 'data-collector settings and uses Chef Server to fetch profiles.' if dc[:token].nil? + config = { 'token' => dc[:token], }