Commit 2110c605 authored by Jeff Blaine's avatar Jeff Blaine Committed by jtimberman
Browse files

DRY cleanup of attrs

Set user/group/priv_separation outside of platform case block
with sane defaults. Override in platform case block as needed.
Moved max_message_size up where it belongs, not dangling at
the bottom of the file.
parent 9124eba4
......@@ -17,36 +17,27 @@
# limitations under the License.
#
default["rsyslog"]["log_dir"] = "/srv/rsyslog"
default["rsyslog"]["server"] = false
default["rsyslog"]["protocol"] = "tcp"
default["rsyslog"]["port"] = "514"
default["rsyslog"]["server_ip"] = nil
default["rsyslog"]["server_search"] = "role:loghost"
default["rsyslog"]["remote_logs"] = true
default["rsyslog"]["per_host_dir"] = "%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%"
default["rsyslog"]["log_dir"] = "/srv/rsyslog"
default["rsyslog"]["server"] = false
default["rsyslog"]["protocol"] = "tcp"
default["rsyslog"]["port"] = "514"
default["rsyslog"]["server_ip"] = nil
default["rsyslog"]["server_search"] = "role:loghost"
default["rsyslog"]["remote_logs"] = true
default["rsyslog"]["per_host_dir"] = "%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%"
default["rsyslog"]["max_message_size"] = "2k"
# The most likely platform-specific attributes
default["rsyslog"]["user"] = "root"
default["rsyslog"]["group"] = "adm"
default["rsyslog"]["priv_seperation"] = false
case node["platform"]
when "debian"
default["rsyslog"]["user"] = "root"
default["rsyslog"]["group"] = "adm"
default["rsyslog"]["priv_seperation"] = false
when "ubuntu"
# syslog user introduced with natty package
if node['platform_version'].to_f >= 10.10 then
default["rsyslog"]["user"] = "root"
default["rsyslog"]["group"] = "adm"
default["rsyslog"]["priv_seperation"] = false
else
if node['platform_version'].to_f < 10.10 then
default["rsyslog"]["user"] = "syslog"
default["rsyslog"]["group"] = "adm"
default["rsyslog"]["priv_seperation"] = true
end
else
#values for fedora at least
default["rsyslog"]["user"] = "root"
default["rsyslog"]["group"] = "root"
default["rsyslog"]["priv_seperation"] = false
end
default["rsyslog"]["max_message_size"] = "2k"
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