Skip to content

Instantly share code, notes, and snippets.

@marcparadise
Created September 19, 2012 20:06
Show Gist options
  • Save marcparadise/3751916 to your computer and use it in GitHub Desktop.
Save marcparadise/3751916 to your computer and use it in GitHub Desktop.
def run_callback_from_file(callback_file)
if whyrun_mode?
recipe_eval { }
else
if ::File.exist?(callback_file)
Dir.chdir(release_path) do
Chef::Log.info "#{@new_resource} running deploy hook #{callback_file}"
recipe_eval { from_file(callback_file) }
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment