[DRE-commits] [vagrant-libvirt] 29/104: add actiob ssh_run for command `vagrant ssh -c "bash cli" ` close #13

Antonio Terceiro terceiro at moszumanska.debian.org
Sun Apr 24 13:55:41 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 2eb772b6ce8fe5487bbf35968e60a85877e2e075
Author: dima <pronix.service at gmail.com>
Date:   Sun May 5 16:21:43 2013 +0200

    add actiob ssh_run for command `vagrant ssh -c "bash cli" ` close #13
---
 lib/vagrant-libvirt/action.rb | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/lib/vagrant-libvirt/action.rb b/lib/vagrant-libvirt/action.rb
index 5b086a2..5b0893f 100644
--- a/lib/vagrant-libvirt/action.rb
+++ b/lib/vagrant-libvirt/action.rb
@@ -222,6 +222,31 @@ module VagrantPlugins
         end
       end
 
+      # This is the action that will run a single SSH command.
+      def self.action_ssh_run
+        Vagrant::Action::Builder.new.tap do |b|
+          b.use ConfigValidate
+          b.use Call, IsCreated do |env, b2|
+            if !env[:result]
+              b2.use MessageNotCreated
+              next
+            end
+
+            b2.use ConnectLibvirt
+            b2.use Call, IsRunning do |env2, b3|
+              if !env2[:result]
+                b3.use MessageNotRunning
+                next
+              end
+
+              b3.use SSHRun
+            end
+          end
+
+        end
+      end
+
+
       action_root = Pathname.new(File.expand_path("../action", __FILE__))
       autoload :ConnectLibvirt, action_root.join("connect_libvirt")
       autoload :IsCreated, action_root.join("is_created")
@@ -249,6 +274,7 @@ module VagrantPlugins
       autoload :TimedProvision, action_root.join("timed_provision")
       autoload :WaitTillUp, action_root.join("wait_till_up")
       autoload :SyncFolders, action_root.join("sync_folders")
+      autoload :SSHRun,  "vagrant/action/builtin/ssh_run"
     end
   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