lib/deprec/recipes/syslog/syslog_ng.rb in le1t0-deprec-2.1.6.057 vs lib/deprec/recipes/syslog/syslog_ng.rb in le1t0-deprec-2.1.6.058
- old
+ new
@@ -122,16 +122,16 @@
:df_kernel => "file(\"/var/log/daemons/kernel-$HOST/$YEAR$MONTH/$DAY/kernel-$HOST-$YEAR$MONTH$DAY\")",
:df_daemons => "file(\"/var/log/daemons/$PROGRAM/$YEAR$MONTH/$DAY/$PROGRAM-$YEAR$MONTH$DAY\")"
}
desc "Install syslog-ng"
- task :install do
+ task :install, :roles => :syslog do
install_deps
end
# install dependencies for syslog-ng
- task :install_deps do
+ task :install_deps, :roles => :syslog do
apt.install( {:base => %w(syslog-ng)}, :stable )
end
SYSTEM_CONFIG_FILES[:syslog_ng] = [
@@ -160,26 +160,26 @@
deprec2.render_template(:syslog, file)
end
end
desc "Push Syslog-ng config files to server"
- task :config do
+ task :config, :roles => :syslog do
deprec2.push_configs(:syslog_ng, SYSTEM_CONFIG_FILES[:syslog_ng])
deprec2.push_configs(:syslog, SYSTEM_CONFIG_FILES[:syslog])
end
desc "Start Syslog-ng"
- task :start do
+ task :start, :roles => :syslog do
run "#{sudo} /etc/init.d/syslog-ng start"
end
desc "Stop Syslog-ng"
- task :stop do
+ task :stop, :roles => :syslog do
run "#{sudo} /etc/init.d/syslog-ng stop"
end
desc "Restart Syslog-ng"
- task :restart do
+ task :restart, :roles => :syslog do
run "#{sudo} /etc/init.d/syslog-ng restart"
end
end