Sha256: 7ea388654df0a7860d84a24e512c20af975de66ff27dbfe34b03bae9e90e4587
Contents?: true
Size: 1008 Bytes
Versions: 8
Compression:
Stored size: 1008 Bytes
Contents
module Vagrant class Config class SSHConfig < Base configures :ssh attr_accessor :username attr_accessor :host attr_accessor :forwarded_port_key attr_accessor :max_tries attr_accessor :timeout attr_writer :private_key_path attr_accessor :forward_agent attr_accessor :forward_x11 attr_accessor :sudo_shell attr_accessor :port def initialize @sudo_shell = "bash" @port = nil end def private_key_path File.expand_path(@private_key_path, env.root_path) end def validate(errors) [:username, :host, :forwarded_port_key, :max_tries, :timeout, :private_key_path].each do |field| errors.add(I18n.t("vagrant.config.common.error_empty", :field => field)) if !instance_variable_get("@#{field}".to_sym) end errors.add(I18n.t("vagrant.config.ssh.private_key_missing", :path => private_key_path)) if !File.file?(private_key_path) end end end end
Version data entries
8 entries across 8 versions & 2 rubygems