sistero 0.7.2 → 0.7.3
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 +4 -4
- data/bin/sistero +2 -2
- data/lib/sistero.rb +6 -2
- data/lib/sistero/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e30ac237dbb3880332a0ce711d3c165f3137873
|
4
|
+
data.tar.gz: 1a4490ef36377a71ecbfa8332c3f18063608bd00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a62c0b266d8531b555b006c1b22e52e6663057917727c56b7b27297f883c77776ac71f13ee9997a01f60025927b49e3e825cdf704438b137d8f77672583de43
|
7
|
+
data.tar.gz: 76e5cd39e8bb4ffc01451a250a397dc2222b9a0d1f10db3dc387bdf5c61f5a69ff1655e270a3f7793065654f0bdb5fded46d5d35ed1685d435be480854e2ba2e
|
data/bin/sistero
CHANGED
@@ -24,7 +24,7 @@ module Sistero::Command
|
|
24
24
|
op.on '-c', '--config file', 'override path to config file', 'cfg_file_path'
|
25
25
|
op.on '-d', '--directory dir', 'set working dir', 'directory'
|
26
26
|
|
27
|
-
op.subcommand 'ssh [vm]', 'ssh to vm' do |subop|
|
27
|
+
op.subcommand 'ssh [vm] [*run]', 'ssh to vm' do |subop|
|
28
28
|
subop.on '-o val', 'add ssh options', 'ssh_options'
|
29
29
|
end
|
30
30
|
|
@@ -57,7 +57,7 @@ module Sistero::Command
|
|
57
57
|
case command
|
58
58
|
when 'ssh'
|
59
59
|
# TODO: pass ssh_args
|
60
|
-
sistero.ssh_to_vm(command_cfg.vm, ssh_options: command_cfg.ssh_options)
|
60
|
+
sistero.ssh_to_vm(command_cfg.vm, ssh_options: command_cfg.ssh_options, run: command_cfg.run)
|
61
61
|
when 'create'
|
62
62
|
vms = command_cfg.vms
|
63
63
|
vms.push nil if vms.empty?
|
data/lib/sistero.rb
CHANGED
@@ -65,7 +65,7 @@ module Sistero
|
|
65
65
|
return false
|
66
66
|
end
|
67
67
|
|
68
|
-
def ssh_to_vm(name, ssh_options: nil)
|
68
|
+
def ssh_to_vm(name, ssh_options: nil, run: nil)
|
69
69
|
vm, name = get_vm name
|
70
70
|
ssh_options ||= vm.ssh_options
|
71
71
|
|
@@ -88,7 +88,11 @@ module Sistero
|
|
88
88
|
end
|
89
89
|
|
90
90
|
cmd = "ssh -o 'StrictHostKeyChecking no' #{ssh_options} #{vm.ssh_user || 'root'}@#{ip}"
|
91
|
-
|
91
|
+
unless run.empty?
|
92
|
+
cmd += ' ' + run.join(' ')
|
93
|
+
end
|
94
|
+
|
95
|
+
# puts cmd
|
92
96
|
exec cmd
|
93
97
|
end
|
94
98
|
|
data/lib/sistero/version.rb
CHANGED