Skip to content

Instantly share code, notes, and snippets.

@ctgswallow
Created February 13, 2013 00:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ctgswallow/4780222 to your computer and use it in GitHub Desktop.
Save ctgswallow/4780222 to your computer and use it in GitHub Desktop.
namespace :varnish do
desc "Configure varnish"
task :configure, :roles => :varnish do
upload("config/deploy/#{stage}/backends.vcl", "/tmp", :via => :scp)
run "#{sudo} cp /tmp/backends.vcl /etc/varnish"
run "#{sudo} varnishadm vcl.load #{date} /etc/varnish/default.vcl && " +
"#{sudo} varnishadm vcl.use #{date} /etc/varnish/default.vcl"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment