Class: VagrantPlugins::Ohai::ActionInstallOhaiPlugin
- Inherits:
-
Object
- Object
- VagrantPlugins::Ohai::ActionInstallOhaiPlugin
- Includes:
- Helpers
- Defined in:
- lib/vagrant-ohai/action_install_ohai_plugin.rb
Constant Summary collapse
- OHAI_PLUGIN_PATH =
File.("../../ohai/vagrant.rb", __FILE__)
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ ActionInstallOhaiPlugin
constructor
A new instance of ActionInstallOhaiPlugin.
Methods included from Helpers
Constructor Details
#initialize(app, env) ⇒ ActionInstallOhaiPlugin
Returns a new instance of ActionInstallOhaiPlugin.
10 11 12 13 14 |
# File 'lib/vagrant-ohai/action_install_ohai_plugin.rb', line 10 def initialize(app, env) @app = app @env = env @machine = env[:machine] end |
Instance Method Details
#call(env) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/vagrant-ohai/action_install_ohai_plugin.rb', line 16 def call(env) is_chef_used = chef_provisioners.any? @app.call(env) return unless @machine.communicate.ready? if is_chef_used && @machine.config.ohai.enable @machine.ui.info("Installing Ohai plugin") create_ohai_folders copy_ohai_plugin end end |