From 91d2a9eedc845938a262f617ca0073e0980953cb Mon Sep 17 00:00:00 2001 From: akarasik Date: Thu, 9 Mar 2017 17:20:36 +0200 Subject: [PATCH] Add attribute to be able to control the bitbucket service If the new attribute will stay set to 'true', no changes will be made to the cookbook or the server installation. If it will be changed to 'false' - 1. The bitbucket service won't be enabled on boot. 2. All restart notifications from config files won't really restart the service. 3. Future start\restart notification won't change the service's state. All those will result in a installed bitbucket server, but with stopped service. And basically it will now enable installing a cold standby server as described here: https://confluence.atlassian.com/bitbucketserver/high-availability-for-bitbucket-server-776640137.html --- attributes/default.rb | 1 + recipes/service_init.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/attributes/default.rb b/attributes/default.rb index c4294a8..d893a08 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -13,6 +13,7 @@ default['stash']['install_path'] = '/opt/atlassian' default['stash']['install_type'] = 'standalone' default['stash']['service_type'] = 'init' +default['stash']['active_service'] = true default['stash']['url_base'] = "http://www.atlassian.com/software/stash/downloads/binary/atlassian-#{node['stash']['product']}" default['stash']['user'] = node['stash']['product'] diff --git a/recipes/service_init.rb b/recipes/service_init.rb index aad4704..1c59158 100644 --- a/recipes/service_init.rb +++ b/recipes/service_init.rb @@ -25,4 +25,5 @@ supports :status => true, :restart => true action [:enable] subscribes :restart, 'java_ark[jdk]' + only_if { node['stash']['active_service'] } end