Skip to content

jacoelho/serverspec-chef-handler

Repository files navigation

chef-handler-serverspec

Sometimes you inherit a chef infrastructure without any test.

How to improve with less amount of effort?

Just add this handler, run chef-client and collect the tests

Configuration

client.rb

require 'chef/handler/serverspec'
report_handlers << Chef::Handler::Serverspec.new

chef_handler cookbook

chef_gem 'chef-handler-serverspec' do
  compile_time false
  action :install
end

chef_handler 'Chef::Handler::Serverspec' do
  source 'chef/handler/serverspec'
  action :enable
  supports report: true
end

Thanks

Thank you tily for the original idea.

Author Information

jacoelho