Class: VagrantPlugins::AMI::Action::CreateAMI
- Inherits:
-
Object
- Object
- VagrantPlugins::AMI::Action::CreateAMI
- Includes:
- Vagrant::Util::Retryable
- Defined in:
- lib/vagrant-ami/action/create_ami.rb
Overview
This runs the configured instance.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ CreateAMI
constructor
A new instance of CreateAMI.
Constructor Details
#initialize(app, env) ⇒ CreateAMI
Returns a new instance of CreateAMI.
13 14 15 16 |
# File 'lib/vagrant-ami/action/create_ami.rb', line 13 def initialize(app, env) @app = app @logger = Log4r::Logger.new("vagrant_ami::action::create_ami") end |
Instance Method Details
#call(env) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/vagrant-ami/action/create_ami.rb', line 18 def call(env) if env[:machine].state.id != :running puts "Skipping #{env[:machine].name}: not running" else _create_ami(env) end end |