Class: ConfigBuilder::Model::WinRM
- Defined in:
- lib/config_builder/model/winrm.rb
Overview
Vagrant WinRM credential model.
Instance Attribute Summary collapse
-
#guest_port ⇒ Fixnum
The port on the guest that WinRM is running on.
-
#host ⇒ String
The hostname or IP to WinRM into.
-
#max_tries ⇒ Fixnum
Maximum number of retry attempts.
-
#password ⇒ String
This sets a password that Vagrant will use to authenticate the WinRM user.
-
#port ⇒ Fixnum
The port to WinRM into.
-
#timeout ⇒ Fixnum
The timeout in seconds.
-
#username ⇒ String
This sets the username that Vagrant will WinRM as by default.
Instance Method Summary collapse
Methods inherited from Base
#attrs=, #call, def_model_attribute, model_attributes, new_from_hash
Instance Attribute Details
#guest_port ⇒ Fixnum
Returns The port on the guest that WinRM is running on. This is used by some providers to detect forwarded ports for WinRM. For example, if this is set to 5985 (the default), and Vagrant detects a forwarded port to port 5985 on the guest from port 4567 on the host, Vagrant will attempt to use port 4567 to talk to the guest if there is no other option.
33 |
# File 'lib/config_builder/model/winrm.rb', line 33 def_model_attribute :guest_port |
#host ⇒ String
Returns The hostname or IP to WinRM into. By default this is empty, because the provider usually figures this out for you.
20 |
# File 'lib/config_builder/model/winrm.rb', line 20 def_model_attribute :host |
#max_tries ⇒ Fixnum
Returns Maximum number of retry attempts. By default this is 20.
37 |
# File 'lib/config_builder/model/winrm.rb', line 37 def_model_attribute :max_tries |
#password ⇒ String
Returns This sets a password that Vagrant will use to authenticate the WinRM user.
15 |
# File 'lib/config_builder/model/winrm.rb', line 15 def_model_attribute :password |
#port ⇒ Fixnum
Returns The port to WinRM into. By default this is port 5985.
24 |
# File 'lib/config_builder/model/winrm.rb', line 24 def_model_attribute :port |
#timeout ⇒ Fixnum
Returns The timeout in seconds. By default this is 1800 seconds.
41 |
# File 'lib/config_builder/model/winrm.rb', line 41 def_model_attribute :timeout |
#username ⇒ String
Returns This sets the username that Vagrant will WinRM as by default. Providers are free to override this if they detect a more appropriate user. By default this is "vagrant," since that is what most public boxes are made as.
10 |
# File 'lib/config_builder/model/winrm.rb', line 10 def_model_attribute :username |
Instance Method Details
#to_proc ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/config_builder/model/winrm.rb', line 43 def to_proc Proc.new do |global_config| winrm = global_config.winrm with_attr(:username) { |val| winrm.username = val } with_attr(:password) { |val| winrm.password = val } with_attr(:host) { |val| winrm.host = val } with_attr(:guest) { |val| winrm.guest = val } with_attr(:guest_port) { |val| winrm.guest_port = val } with_attr(:max_tries) { |val| winrm.max_tries = val } with_attr(:timeout) { |val| winrm.timeout = val } end end |