Class: VagrantPlugins::ArubaCloud::Action::ArubaProvision
- Inherits:
-
Vagrant::Action::Builtin::Provision
- Object
- Vagrant::Action::Builtin::Provision
- VagrantPlugins::ArubaCloud::Action::ArubaProvision
- Defined in:
- lib/vagrant-arubacloud/action/aruba_provision.rb
Overview
This override is needed to intercept provisioning action and call the disable_requiretty capability. This is horrible, but for now that’s it.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ ArubaProvision
constructor
A new instance of ArubaProvision.
Constructor Details
#initialize(app, env) ⇒ ArubaProvision
Returns a new instance of ArubaProvision.
12 13 14 15 |
# File 'lib/vagrant-arubacloud/action/aruba_provision.rb', line 12 def initialize(app, env) @machine = env[:machine] super end |
Instance Method Details
#call(env) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/vagrant-arubacloud/action/aruba_provision.rb', line 17 def call(env) @env = env if @machine.guest.name.eql? :redhat unless @machine.guest.capability?(:disable_requiretty) @machine.ui.warn(I18n.t('vagrant_arubacloud.disable_require_tty_cap_not_found')) return end @machine.ui.detail(I18n.t('vagrant_arubacloud.disabling_requiretty')) @machine.guest.capability(:disable_requiretty) end # Return the control to original Provision in middleware stack super end |