Commit 1839f1be authored by Mihai Petracovici's avatar Mihai Petracovici
Browse files

Additional Rubocop fixes

parent fe45718f
module RsyslogCookbook
# helpers for the various service providers on Ubuntu systems
module Helpers
def declare_rsyslog_service
if 'ubuntu' == node['platform']
def find_provider
if Chef::VersionConstraint.new('>= 15.04').include?(node['platform_version'])
service_provider = Chef::Provider::Service::Systemd
elsif Chef::VersionConstraint.new('>= 12.04').include?(node['platform_version'])
......@@ -10,8 +9,12 @@ module RsyslogCookbook
else
service_provider = nil
end
service_provider
end
def declare_rsyslog_service
service_provider = 'ubuntu' == node['platform'] ? find_provider : nil
service 'rsyslog' do
service_name node['rsyslog']['service_name']
supports :restart => true, :status => true
......
require 'fileutils'
unless Dir.exists?("#{node['rsyslog']['config_prefix']}/rsyslog.d")
unless Dir.exist?("#{node['rsyslog']['config_prefix']}/rsyslog.d")
FileUtils.mkdir("#{node['rsyslog']['config_prefix']}/rsyslog.d")
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