Sha256: 5ab973cd5de7243892f6499e465cadefad5bca946bf7ed59c5f9776b4091c2e3

Contents?: true

Size: 590 Bytes

Versions: 44

Compression:

Stored size: 590 Bytes

Contents

class Chef
  module Compliance
    module Reporter
      class AuditEnforcer
        class ControlFailure < StandardError; end

        def send_report(report)
          report.fetch(:profiles, []).each do |profile|
            profile.fetch(:controls, []).each do |control|
              control.fetch(:results, []).each do |result|
                raise ControlFailure, "Audit #{control[:id]} has failed. Aborting #{ChefUtils::Dist::Infra::CLIENT} run." if result[:status] == "failed"
              end
            end
          end
          true
        end
      end
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
chef-16.18.30-universal-mingw32 lib/chef/compliance/reporter/compliance_enforcer.rb
chef-16.18.30 lib/chef/compliance/reporter/compliance_enforcer.rb
chef-16.18.0-universal-mingw32 lib/chef/compliance/reporter/compliance_enforcer.rb
chef-16.18.0 lib/chef/compliance/reporter/compliance_enforcer.rb
chef-16.17.51-universal-mingw32 lib/chef/compliance/reporter/compliance_enforcer.rb
chef-16.17.51 lib/chef/compliance/reporter/compliance_enforcer.rb
chef-16.17.39-universal-mingw32 lib/chef/compliance/reporter/compliance_enforcer.rb
chef-16.17.39 lib/chef/compliance/reporter/compliance_enforcer.rb
chef-16.17.18-universal-mingw32 lib/chef/compliance/reporter/compliance_enforcer.rb
chef-16.17.18 lib/chef/compliance/reporter/compliance_enforcer.rb
chef-16.17.4-universal-mingw32 lib/chef/compliance/reporter/compliance_enforcer.rb
chef-16.17.4 lib/chef/compliance/reporter/compliance_enforcer.rb
chef-16.16.13-universal-mingw32 lib/chef/compliance/reporter/compliance_enforcer.rb
chef-16.16.13 lib/chef/compliance/reporter/compliance_enforcer.rb
chef-16.16.7-universal-mingw32 lib/chef/compliance/reporter/compliance_enforcer.rb
chef-16.16.7 lib/chef/compliance/reporter/compliance_enforcer.rb
chef-16.15.22-universal-mingw32 lib/chef/compliance/reporter/compliance_enforcer.rb
chef-16.15.22 lib/chef/compliance/reporter/compliance_enforcer.rb
chef-16.14.1-universal-mingw32 lib/chef/compliance/reporter/compliance_enforcer.rb
chef-16.14.1 lib/chef/compliance/reporter/compliance_enforcer.rb