kontena-plugin-vagrant 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 08ae2e51eecc84137f3dc9663d6ebd4e88cfe4b8
|
4
|
+
data.tar.gz: 111f32338ef7500c77560e2529bc6ffe20b5baa9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 684ae2978624bd34b3042f39e877ecf7be51b1637485b2f9d5e07e83749c3aadd1abf377c7b0dc3edaa8681bb4f2ccf954b6dd4ed8e213b624a0df01a6457e3b
|
7
|
+
data.tar.gz: 206a3751430018109b1dce5d925666798f3a1184da7aed082340b6cc8cfdd767a40132ed0cf2e1fc5c53a52861e910cb26c135d484b5a92663b33681eb1fa66b
|
@@ -2,14 +2,22 @@ module Kontena::Plugin::Vagrant::Master
|
|
2
2
|
class SshCommand < Kontena::Command
|
3
3
|
include Kontena::Cli::Common
|
4
4
|
|
5
|
+
parameter "[COMMANDS] ...", "Run command on Master"
|
6
|
+
|
5
7
|
def execute
|
8
|
+
require 'shellwords'
|
6
9
|
require_relative '../../../machine/vagrant'
|
7
10
|
|
8
11
|
vagrant_path = "#{Dir.home}/.kontena/vagrant_master"
|
9
12
|
abort("Cannot find Vagrant kontena-master".colorize(:red)) unless Dir.exist?(vagrant_path)
|
10
13
|
|
14
|
+
cmd = "vagrant ssh"
|
15
|
+
if self.commands_list && !self.commands_list.empty?
|
16
|
+
cmd << " -c '#{self.commands_list.shelljoin}'"
|
17
|
+
end
|
18
|
+
|
11
19
|
Dir.chdir(vagrant_path) do
|
12
|
-
system(
|
20
|
+
system(cmd)
|
13
21
|
end
|
14
22
|
end
|
15
23
|
end
|
@@ -4,18 +4,24 @@ module Kontena::Plugin::Vagrant::Nodes
|
|
4
4
|
include Kontena::Cli::GridOptions
|
5
5
|
|
6
6
|
parameter "NAME", "Node name"
|
7
|
+
parameter "[COMMANDS] ...", "Run command on node"
|
7
8
|
|
8
9
|
def execute
|
9
10
|
require_api_url
|
10
11
|
require_current_grid
|
11
12
|
|
13
|
+
require 'shellwords'
|
12
14
|
require_relative '../../../machine/vagrant'
|
13
15
|
|
14
16
|
vagrant_path = "#{Dir.home}/.kontena/#{current_grid}/#{name}"
|
15
17
|
abort("Cannot find Vagrant node #{name}".colorize(:red)) unless Dir.exist?(vagrant_path)
|
16
18
|
|
19
|
+
cmd = "vagrant ssh"
|
20
|
+
if self.commands_list && !self.commands_list.empty?
|
21
|
+
cmd << " -c '#{self.commands_list.shelljoin}'"
|
22
|
+
end
|
17
23
|
Dir.chdir(vagrant_path) do
|
18
|
-
system(
|
24
|
+
system(cmd)
|
19
25
|
end
|
20
26
|
end
|
21
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kontena-plugin-vagrant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kontena, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kontena-cli
|