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

[why-run] Skip dd-handler recipe in why-run mode #231

Merged
merged 1 commit into from
Oct 15, 2015
Merged
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
8 changes: 8 additions & 0 deletions recipes/dd-handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
# limitations under the License.
#

if Chef::Config[:why_run]
# chef_handler 1.1 needs us to require datadog handler's file,
# which makes why-run runs fail when chef-handler-datadog is not installed,
# so skip the recipe when in why-run mode until we can use chef_handler 1.2
Chef::Log.warn('Running in why-run mode, skipping dd-handler')
return
end

include_recipe 'chef_handler'
ENV['DATADOG_HOST'] = node['datadog']['url']

Expand Down