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