From 205acfc7fa8a7d78d6afb5727e7c58bbe636289d Mon Sep 17 00:00:00 2001 From: Jirka Fajfr Date: Fri, 17 Jun 2016 09:26:42 -0500 Subject: [PATCH] - Support of consul config reload on windows platform --- libraries/consul_service_windows.rb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/libraries/consul_service_windows.rb b/libraries/consul_service_windows.rb index 7f2db0c0..fe1bad78 100644 --- a/libraries/consul_service_windows.rb +++ b/libraries/consul_service_windows.rb @@ -64,12 +64,20 @@ def action_enable end def action_reload - Chef::Log.info 'The service provider for Consul on Windows does not support reload!' + notifying_block do + execute 'Reload consul' do + command 'consul.exe reload' + cwd ::File.dirname(new_resource.program) + action :run + end + end end def action_restart - powershell_script 'Restart consul' do - code 'restart-service consul' + notifying_block do + powershell_script 'Restart consul' do + code 'restart-service consul' + end end end