diff --git a/chef/cookbooks/rsyslog/recipes/client.rb b/chef/cookbooks/rsyslog/recipes/client.rb index abe863a..faaf07a 100644 --- a/chef/cookbooks/rsyslog/recipes/client.rb +++ b/chef/cookbooks/rsyslog/recipes/client.rb @@ -25,7 +25,7 @@ package "dstat" do end execute "dstat" do - command "dstat -tcmndp --top-cpu --freespace >>/var/log/dstat.log &" + command "dstat -tcmndp --top-cpu >>/var/log/dstat.log &" action :run end @@ -129,7 +129,7 @@ template "/etc/rsyslog.d/sysstat.conf" do group "root" mode 0644 variables :loglist => node['rsyslog']['sysstatlog'] - notifies :restart, "service[rsyslog]" + notifies :restart, "service[rsyslog]", :immediately end file "/etc/rsyslog.d/server.conf" do diff --git a/chef/cookbooks/rsyslog/recipes/default.rb b/chef/cookbooks/rsyslog/recipes/default.rb index b2a84fb..ebcd6bd 100644 --- a/chef/cookbooks/rsyslog/recipes/default.rb +++ b/chef/cookbooks/rsyslog/recipes/default.rb @@ -29,6 +29,14 @@ if platform?("ubuntu") && node['platform_version'].to_f == 8.04 end end +if platform?("ubuntu") + execute "apt-get-update" do + command "apt-get update" + ignore_failure true + action :run + end +end + package "rsyslog" do action :install end