Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable chef-server fetcher attribute #145

Merged
merged 1 commit into from
Nov 4, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
# chef-visibility requires inspec version 0.27.1 or above
default['audit']['collector'] = 'chef-server'

# It will use an InSpec fetcher that fetches compliance profiles via Chef Server
# from Chef Compliance. Will be activated by default if the 'chef-server' collector
# is used
# fetcher possible values: chef-server
default['audit']['fetcher'] = nil

# Attributes server, insecure and token/refresh_token are only needed for the 'chef-compliance' collector
# server format example: 'https://comp-server.example.com/api'
default['audit']['server'] = nil
Expand Down
2 changes: 1 addition & 1 deletion files/default/handler/audit_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def report
load_needed_dependencies

# detect if we run in a chef client with chef server
load_chef_fetcher if reporters.include?('chef-server')
load_chef_fetcher if reporters.include?('chef-server') || node['audit']['fetcher'] == 'chef-server'

# iterate through reporters
reporters.each do |reporter|
Expand Down