Commit 957134d7 authored by Jeff Blaine's avatar Jeff Blaine Committed by jtimberman
Browse files

Introduce service_name attribute and reference it

Move "arch" service name case from recipe into attributes, too
parent d1106a38
...@@ -26,6 +26,7 @@ default["rsyslog"]["server_search"] = "role:loghost" ...@@ -26,6 +26,7 @@ default["rsyslog"]["server_search"] = "role:loghost"
default["rsyslog"]["remote_logs"] = true default["rsyslog"]["remote_logs"] = true
default["rsyslog"]["per_host_dir"] = "%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%" default["rsyslog"]["per_host_dir"] = "%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%"
default["rsyslog"]["max_message_size"] = "2k" default["rsyslog"]["max_message_size"] = "2k"
default["rsyslog"]["service_name"] = "rsyslog"
# The most likely platform-specific attributes # The most likely platform-specific attributes
default["rsyslog"]["user"] = "root" default["rsyslog"]["user"] = "root"
...@@ -43,4 +44,6 @@ when "ubuntu" ...@@ -43,4 +44,6 @@ when "ubuntu"
end end
when "redhat" when "redhat"
default["rsyslog"]["defaults_file"] = "/etc/sysconfig/rsyslog" default["rsyslog"]["defaults_file"] = "/etc/sysconfig/rsyslog"
when "arch"
default["rsyslog"]["service_name"] = "rsyslogd"
end end
...@@ -72,8 +72,7 @@ if platform?("ubuntu") ...@@ -72,8 +72,7 @@ if platform?("ubuntu")
end end
end end
service "rsyslog" do service "#{node["rsyslog"]["service_name"]}" do
service_name "rsyslogd" if platform?("arch")
supports :restart => true, :reload => true supports :restart => true, :reload => true
action [:enable, :start] action [:enable, :start]
end end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment