diff --git a/attributes/default.rb b/attributes/default.rb index c0b8ff6..bdd74e9 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -8,3 +8,9 @@ # you should override this in your environment with the real cluster default.zookeeper.smartstack_cluster = [ 'localhost:2181' ] + +default.smartstack.service_path = value_for_platform( + 'centos' => { 'default' => '/sbin/service' }, + 'ubuntu' => { 'default' => '/usr/sbin/service' }, + 'default' => '/usr/sbin/service' +) diff --git a/recipes/synapse.rb b/recipes/synapse.rb index 4ce89e3..4274ccc 100644 --- a/recipes/synapse.rb +++ b/recipes/synapse.rb @@ -28,7 +28,7 @@ owner "root" group "root" mode 0440 - content "#{node.smartstack.user} ALL= NOPASSWD: /usr/sbin/service haproxy reload\n" + content "#{node.smartstack.user} ALL= NOPASSWD: #{node.smartstack.service_path} haproxy reload\n" end # get the synapse code