summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Higgins <pete@peterhiggins.org>2020-12-11 12:32:06 -0800
committerPete Higgins <pete@peterhiggins.org>2020-12-11 12:44:08 -0800
commitae73cc4b2cdeb419a919509e20a0529b95e22134 (patch)
tree06bd3aebdd1c0c0c184e089b02b8ed084bc71923
parentf920d6d951bd368b3b365c17114ac09f68925c17 (diff)
downloadchef-ae73cc4b2cdeb419a919509e20a0529b95e22134.tar.gz
Inline some local variables and alphabetize hash keys.
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
-rw-r--r--lib/chef/compliance/runner.rb20
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/chef/compliance/runner.rb b/lib/chef/compliance/runner.rb
index fc7a1210b8..0de8fd174e 100644
--- a/lib/chef/compliance/runner.rb
+++ b/lib/chef/compliance/runner.rb
@@ -210,30 +210,26 @@ class Chef
end
def reporter(reporter_type)
- insecure = node["audit"]["insecure"]
- run_time_limit = node["audit"]["run_time_limit"]
- control_results_limit = node["audit"]["control_results_limit"]
-
case reporter_type
when "chef-automate"
opts = {
+ control_results_limit: node["audit"]["control_results_limit"],
entity_uuid: node["chef_guid"],
- run_id: run_id,
+ insecure: node["audit"]["insecure"],
node_info: node_info,
- insecure: insecure,
- run_time_limit: run_time_limit,
- control_results_limit: control_results_limit,
+ run_id: run_id,
+ run_time_limit: node["audit"]["run_time_limit"],
}
Chef::Compliance::Reporter::Automate.new(opts)
when "chef-server-automate"
opts = {
+ control_results_limit: node["audit"]["control_results_limit"],
entity_uuid: node["chef_guid"],
- run_id: run_id,
+ insecure: node["audit"]["insecure"],
node_info: node_info,
- insecure: insecure,
+ run_id: run_id,
+ run_time_limit: node["audit"]["run_time_limit"],
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"