From ce6e0cb2346a2d3142eadba86a2b022a99f972cd Mon Sep 17 00:00:00 2001 From: Ranjib Dey Date: Wed, 15 May 2013 15:37:43 -0700 Subject: [PATCH] foodcritic alerts fixes --- recipes/mgmt_console.rb | 4 +++- recipes/virtualhost_management.rb | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/recipes/mgmt_console.rb b/recipes/mgmt_console.rb index 933eeac9..6c62ce31 100644 --- a/recipes/mgmt_console.rb +++ b/recipes/mgmt_console.rb @@ -21,9 +21,11 @@ plugins = %w( rabbitmq_management rabbitmq_management_visualiser ) +service_name = node['rabbitmq']['service_name'] + plugins.each do |plugin| rabbitmq_plugin plugin do action :enable - notifies :restart, resources(:service => node['rabbitmq']['service_name']) + notifies :restart, "service[#{service_name}]" end end diff --git a/recipes/virtualhost_management.rb b/recipes/virtualhost_management.rb index b545fde7..114aa36c 100644 --- a/recipes/virtualhost_management.rb +++ b/recipes/virtualhost_management.rb @@ -20,11 +20,11 @@ include_recipe "rabbitmq::default" virtualhosts = node['rabbitmq']['virtualhosts'] - +service_name = node['rabbitmq']['service_name'] virtualhosts.each do |virtualhost| rabbitmq_vhost virtualhost do action :add - notifies :restart, resources(:service => node['rabbitmq']['service_name']) + notifies :restart, "service[#{service_name}]" end end