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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0ddcfb032e66acac3cbf5995f2c55512ec96914
4
- data.tar.gz: 8949d507e09af654f4f416a44f1dde2f43054298
3
+ metadata.gz: 0e30ac237dbb3880332a0ce711d3c165f3137873
4
+ data.tar.gz: 1a4490ef36377a71ecbfa8332c3f18063608bd00
5
5
  SHA512:
6
- metadata.gz: 1517d1ff6e9bca512ffab5ee3de71f95ffe34850fd2149c484dd24d76f660a66c952d826a232e133dc75a1e451b6cc1bce0a4b5dca825f31922a96b9f2916c35
7
- data.tar.gz: 70c93f7d2c14a461d57edbc13abf942e29e5365fe56653e68f479ce9aa326eb423d07e7ee7a865b75993030f3a5fe2ced8dea7d06387bca2141564a527e9a473
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
- puts cmd
91
+ unless run.empty?
92
+ cmd += ' ' + run.join(' ')
93
+ end
94
+
95
+ # puts cmd
92
96
  exec cmd
93
97
  end
94
98
 
@@ -1,3 +1,3 @@
1
1
  module Sistero
2
- VERSION = '0.7.2'
2
+ VERSION = '0.7.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sistero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Pike