bcome 0.0.4 → 0.0.5

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: f8b43a40c66431c8282e710e49721519ae9cdd22
4
- data.tar.gz: 6aab609acf080f4686b1ebceb016cd7162877579
3
+ metadata.gz: 2d630f53472c53d7e8aeaddc8ed421f9c33d96c5
4
+ data.tar.gz: ddea85eff27d16001e97f1fb016db46f70b8eb94
5
5
  SHA512:
6
- metadata.gz: f1583a06db19ab8874ce7b3b985e3366ff74dcfffe4a7162db5c502d3582ee1b1a5328dc9f061caf863ca38d74e913d38114c9f73804616c4cef8cce10321fc4
7
- data.tar.gz: 8d671a6476db8a8ed65da10b25a0201da57d4c66ab270b75f5bb6a921d7351bdb1a2e27f2ffe317f2c7bd07f0fe96a9a7ce6d71e7b40ce554149c6a6baa2d95d
6
+ metadata.gz: 5f0f90ec257345ec95812c03d8e062bb7a3b5debe6c0e8d5ef34105bfaf7e348c7711746e2f5621c326b177ab67aa1df75fbc4429253154998156b213291f861
7
+ data.tar.gz: 5d4313c37b3836df5cedddf5e7094951bfe985e02d28884aa725106669a9f6112307dcec8e07ebca8e6477f2b4ef0672e1f27fc850f84ef40554b97a4982c2e2
@@ -1,3 +1,3 @@
1
1
  module Bcome
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -23,13 +23,17 @@ module ::Bcome::InstanceSsh
23
23
  end
24
24
 
25
25
  def ssh_jump_command_to_internal_node
26
- command = "ssh -o UserKnownHostsFile=/dev/null -i #{ssh_key_path} -o \"ProxyCommand ssh -W %h:%p -i #{ssh_key_path} #{ssh_user}@#{bastion_ip_address}\" #{ssh_user}@#{ip_address}"
26
+ command = "ssh -o UserKnownHostsFile=/dev/null -i #{ssh_key_path} -o \"ProxyCommand ssh -W %h:%p -i #{ssh_key_path} #{nat_user}@#{bastion_ip_address}\" #{ssh_user}@#{ip_address}"
27
27
  end
28
28
 
29
29
  def direct_ssh_command
30
30
  command = "ssh #{environment.ssh_mode_user}@#{public_ip_address}"
31
31
  end
32
32
 
33
+ def nat_user
34
+ return @environment.ssh_nat_user ? @environment.ssh_nat_user : ssh_user
35
+ end
36
+
33
37
  def ssh_user
34
38
  # defined by the environment or we fall back to the local user
35
39
  return @environment.ssh_mode_user ? @environment.ssh_mode_user : `whoami`.gsub("\n","")
@@ -52,6 +52,10 @@ module ::Bcome::Stack
52
52
  return @meta_data[:ssh_mode][:ssh_user]
53
53
  end
54
54
 
55
+ def ssh_nat_user
56
+ return @meta_data[:ssh_mode][:nat_user]
57
+ end
58
+
55
59
  def sudo
56
60
  toggle_sudo
57
61
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bcome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillaume Roderick (Webzakimbo)