Last active
December 13, 2015 23:19
-
-
Save ctgswallow/4991025 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Configure Varnish cache module" | |
task :varnish, :roles => :publish do | |
run "cd #{latest_release}/docroot/sites/exacttarget ; drush dl -y varnish" | |
run "cd #{latest_release}/docroot/sites/exacttarget ; drush en -y varnish" | |
vcache = (find_servers :roles => :varnish).collect { |s| "#{s}:6080" }.join " " | |
vsettings = { "varnish_cache_clear" => "1", | |
"varnish_control_key" => :varnish_key.to_s, | |
"varnish_control_terminal" => "#{vcache}", | |
"varnish_flush_cron" => "0", | |
"varnish_socket_timeout" => "3600", | |
"varnish_version" => "3" } | |
vsettings.each do |k, v| | |
run %Q(cd #{latest_release}/docroot/sites/exacttarget ; drush vset #{k} "#{v}") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment