plugins/kernel_v2/config/ssh.rb in vagrant-unbundled-1.8.5.2 vs plugins/kernel_v2/config/ssh.rb in vagrant-unbundled-1.9.1.1
- old
+ new
@@ -13,28 +13,29 @@
attr_accessor :shell
attr_accessor :proxy_command
attr_accessor :ssh_command
attr_accessor :pty
attr_accessor :sudo_command
+ attr_accessor :export_command_template
attr_reader :default
def initialize
super
- @forward_agent = UNSET_VALUE
- @forward_x11 = UNSET_VALUE
- @forward_env = UNSET_VALUE
- @guest_port = UNSET_VALUE
- @keep_alive = UNSET_VALUE
- @proxy_command = UNSET_VALUE
- @ssh_command = UNSET_VALUE
- @pty = UNSET_VALUE
- @shell = UNSET_VALUE
- @sudo_command = UNSET_VALUE
-
- @default = SSHConnectConfig.new
+ @forward_agent = UNSET_VALUE
+ @forward_x11 = UNSET_VALUE
+ @forward_env = UNSET_VALUE
+ @guest_port = UNSET_VALUE
+ @keep_alive = UNSET_VALUE
+ @proxy_command = UNSET_VALUE
+ @ssh_command = UNSET_VALUE
+ @pty = UNSET_VALUE
+ @shell = UNSET_VALUE
+ @sudo_command = UNSET_VALUE
+ @export_command_template = UNSET_VALUE
+ @default = SSHConnectConfig.new
end
def merge(other)
super.tap do |result|
merged_defaults = @default.merge(other.default)
@@ -52,9 +53,13 @@
@keep_alive = true if @keep_alive == UNSET_VALUE
@proxy_command = nil if @proxy_command == UNSET_VALUE
@ssh_command = nil if @ssh_command == UNSET_VALUE
@pty = false if @pty == UNSET_VALUE
@shell = "bash -l" if @shell == UNSET_VALUE
+
+ if @export_command_template == UNSET_VALUE
+ @export_command_template = 'export %ENV_KEY%="%ENV_VALUE%"'
+ end
if @sudo_command == UNSET_VALUE
@sudo_command = "sudo -E -H %c"
end