From 2bada5fc354c0991f32b1206e2a00e4ec113d388 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 10 Nov 2014 19:53:35 +0000 Subject: [PATCH] add ability to create db on remote host --- lib/llt/db_handler/tasks.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/llt/db_handler/tasks.rb b/lib/llt/db_handler/tasks.rb index 8f01a4c..c90488c 100644 --- a/lib/llt/db_handler/tasks.rb +++ b/lib/llt/db_handler/tasks.rb @@ -10,8 +10,9 @@ end desc 'Creates the stem database' - task :create do - exec 'createdb -U prometheus -h localhost -T template0 prometheus_stems' + task :create, :host do |t, args| + host = args[:host] || 'localhost' + exec "createdb -U prometheus -h #{host} -T template0 prometheus_stems" end desc 'Opens the psql console'