Class: VagrantPlugins::PuppetModules::Action::InstallPuppetModules
- Inherits:
-
Object
- Object
- VagrantPlugins::PuppetModules::Action::InstallPuppetModules
- Defined in:
- lib/vagrant-puppet-modules/action/install_puppet_modules.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ InstallPuppetModules
constructor
A new instance of InstallPuppetModules.
Constructor Details
#initialize(app, env) ⇒ InstallPuppetModules
Returns a new instance of InstallPuppetModules.
6 7 8 9 10 |
# File 'lib/vagrant-puppet-modules/action/install_puppet_modules.rb', line 6 def initialize(app, env) @app = app @machine = env[:machine] @logger = Log4r::Logger.new('vagrantplugins::puppet_modules::action::installmodules') end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/vagrant-puppet-modules/action/install_puppet_modules.rb', line 12 def call(env) if @machine.communicate.ready? && provision_enabled?(env) if @machine.config.puppet_modules.puppetfile_dir.nil? env[:ui].info "Puppetfile is not defined, puppet modules won't be installed" return end install_modules(env) end @app.call(env) end |