👴 Careful You’re reading an old article ! Some links might be broken and content may be outdated

Capistrano can be a great tool to run a task on several servers. It can be a task like uploading a maintenance page or deleting some logs :

task :NAME_OF_YOUR_TASK do
desc <<-DESC
This is my awesome task. Description appears in help so write it carefully.
DESC
run "rm -rf #{logs_folder}"
run "mkdir #{destination_folder}"
top.upload("index.html", "#{destination_folder}/index.html")
end

You can read more about writing Capistrano tasks here.