From b779e43623fe27e8efbf64f53001623612d81b94 Mon Sep 17 00:00:00 2001 From: Geoff Gravitate Date: Wed, 6 Jan 2016 04:03:46 -0800 Subject: [PATCH] Create web-rollback.rb Missing Rollback for Web (Static Web Servers) --- deploy/recipes/web-rollback.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 deploy/recipes/web-rollback.rb diff --git a/deploy/recipes/web-rollback.rb b/deploy/recipes/web-rollback.rb new file mode 100644 index 0000000000..a48b250e2a --- /dev/null +++ b/deploy/recipes/web-rollback.rb @@ -0,0 +1,16 @@ +# +# Cookbook Name:: rollback +# Recipe:: web +# + +node[:deploy].each do |application, deploy| + deploy deploy[:deploy_to] do + user deploy[:user] + action 'rollback' + restart_command "sleep #{deploy[:sleep_before_restart]} && #{deploy[:restart_command]}" + + only_if do + File.exists?(deploy[:current_path]) + end + end +end