Merge "Run apt-get update before installing log related packages"

This commit is contained in:
Jenkins 2014-06-17 02:21:16 +00:00 committed by Gerrit Code Review
commit 9d84b7373d
2 changed files with 10 additions and 2 deletions

View File

@ -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

View File

@ -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