[DRE-commits] [vagrant-libvirt] 02/104: set provider

Antonio Terceiro terceiro at moszumanska.debian.org
Sun Apr 24 13:55:38 UTC 2016


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to annotated tag 0.0.11
in repository vagrant-libvirt.

commit a270ad74ee310ae67cdea1903baff782021bc5f2
Author: dima <pronix.service at gmail.com>
Date:   Wed Mar 27 09:43:32 2013 +0100

    set provider
---
 lib/vagrant-libvirt.rb | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/lib/vagrant-libvirt.rb b/lib/vagrant-libvirt.rb
index ad69975..264906d 100644
--- a/lib/vagrant-libvirt.rb
+++ b/lib/vagrant-libvirt.rb
@@ -11,7 +11,7 @@ module VagrantPlugins
     # Hold connection handler so there is no need to connect more times than
     # one. This can be annoying when there are more machines to create, or when
     # doing state action first and then some other.
-    # 
+    #
     # TODO Don't sure if this is the best solution
     @@libvirt_connection = nil
     def self.libvirt_connection
@@ -24,7 +24,16 @@ module VagrantPlugins
 
     def self.source_root
       @source_root ||= Pathname.new(File.expand_path("../../", __FILE__))
-    end  
+    end
   end
 end
 
+# set provider by bash env
+# export VAGRANT_DEFAULT_PROVIDER=libvirt
+Vagrant::Environment.class_eval do
+  def default_provider
+    (ENV['VAGRANT_DEFAULT_PROVIDER'] || :virtualbox).to_sym
+  end
+end
+
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/vagrant-libvirt.git



More information about the Pkg-ruby-extras-commits mailing list