Advertisement
Guest User

Untitled

a guest
Jan 31st, 2017
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. desc "Dump stash files"
  2. task :dump_stash do
  3. on roles (:db) do |host|
  4. if fetch(:stage).to_s == 'local'
  5. run_locally do
  6. execute "vagrant ssh -c 'mysql --user=#{fetch(:db_user)} --password=#{fetch(:db_pass)} #{fetch(:db_name)} -e 'TRUNCATE TABLE `exp_stash`;''"
  7. end
  8. else
  9. execute "mysql --user=#{fetch(:db_user)} --password=#{fetch(:db_pass)} #{fetch(:db_name)} -e 'TRUNCATE TABLE `exp_stash`;'"
  10. end
  11. end
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement