summaryrefslogtreecommitdiff
path: root/lib/chef/compliance
diff options
context:
space:
mode:
authorPete Higgins <pete@peterhiggins.org>2020-12-11 12:26:30 -0800
committerPete Higgins <pete@peterhiggins.org>2020-12-11 12:44:08 -0800
commitf920d6d951bd368b3b365c17114ac09f68925c17 (patch)
tree5e0845036f61dd4558567bcf837c22e0667b49b0 /lib/chef/compliance
parentce2d4b36cc532732d2631c905f8c7206b496458c (diff)
downloadchef-f920d6d951bd368b3b365c17114ac09f68925c17.tar.gz
Remove gate on impossible case.
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
Diffstat (limited to 'lib/chef/compliance')
-rw-r--r--lib/chef/compliance/runner.rb26
1 files changed, 10 insertions, 16 deletions
diff --git a/lib/chef/compliance/runner.rb b/lib/chef/compliance/runner.rb
index 789ff74419..fc7a1210b8 100644
--- a/lib/chef/compliance/runner.rb
+++ b/lib/chef/compliance/runner.rb
@@ -226,22 +226,16 @@ class Chef
}
Chef::Compliance::Reporter::Automate.new(opts)
when "chef-server-automate"
- url = chef_server_automate_url
- if url
- opts = {
- entity_uuid: node["chef_guid"],
- run_id: run_id,
- node_info: node_info,
- insecure: insecure,
- url: url,
- run_time_limit: run_time_limit,
- control_results_limit: control_results_limit,
- }
- Chef::Compliance::Reporter::ChefServerAutomate.new(opts)
- else
- logger.warn "Unable to determine #{ChefUtils::Dist::Server::PRODUCT} url required by #{Inspec::Dist::PRODUCT_NAME} report collector 'chef-server-automate'. Skipping..."
- nil
- end
+ opts = {
+ entity_uuid: node["chef_guid"],
+ run_id: run_id,
+ node_info: node_info,
+ insecure: insecure,
+ url: chef_server_automate_url,
+ run_time_limit: run_time_limit,
+ control_results_limit: control_results_limit,
+ }
+ Chef::Compliance::Reporter::ChefServerAutomate.new(opts)
when "json-file"
path = node["audit"]["json_file"]["location"]
logger.info "Writing compliance report to #{path}"