Class: VagrantUp::RakeTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- VagrantUp::RakeTask
- Includes:
- DaptivChefCI::RakeTaskHelpers, Rake::DSL
- Defined in:
- lib/daptiv-chef-ci/vagrant_up_task.rb
Overview
Example usage, ups and provisions a Vagrant box without halting or destroying it.
VagrantUp::RakeTask.new ‘up’ do |t|
t.provider = :vmware_fusion
t.up_timeout_in_seconds = 3600
t.environment = { :ENV_VAR1 => 'val1', :ENV_VAR2 => 'val2' }
end
This class lets you define Rake tasks to drive Vagrant.
Instance Attribute Summary collapse
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#up_timeout_in_seconds ⇒ Object
Returns the value of attribute up_timeout_in_seconds.
-
#vagrant_driver ⇒ Object
writeonly
Sets the attribute vagrant_driver.
Instance Method Summary collapse
-
#initialize(name = 'vagrant_up', desc = 'Vagrant up task') {|_self| ... } ⇒ RakeTask
constructor
A new instance of RakeTask.
Methods included from DaptivChefCI::RakeTaskHelpers
#execute, #exit_on_failure, #exit_on_failure=
Constructor Details
#initialize(name = 'vagrant_up', desc = 'Vagrant up task') {|_self| ... } ⇒ RakeTask
Returns a new instance of RakeTask.
31 32 33 34 35 36 37 38 |
# File 'lib/daptiv-chef-ci/vagrant_up_task.rb', line 31 def initialize(name = 'vagrant_up', desc = 'Vagrant up task') @name, @desc = name, desc @provider = :virtualbox @up_timeout_in_seconds = 7200 @environment = {} yield self if block_given? define_task end |
Instance Attribute Details
#environment ⇒ Object
Returns the value of attribute environment.
26 27 28 |
# File 'lib/daptiv-chef-ci/vagrant_up_task.rb', line 26 def environment @environment end |
#provider ⇒ Object
Returns the value of attribute provider.
24 25 26 |
# File 'lib/daptiv-chef-ci/vagrant_up_task.rb', line 24 def provider @provider end |
#up_timeout_in_seconds ⇒ Object
Returns the value of attribute up_timeout_in_seconds.
25 26 27 |
# File 'lib/daptiv-chef-ci/vagrant_up_task.rb', line 25 def up_timeout_in_seconds @up_timeout_in_seconds end |
#vagrant_driver=(value) ⇒ Object
Sets the attribute vagrant_driver
23 24 25 |
# File 'lib/daptiv-chef-ci/vagrant_up_task.rb', line 23 def vagrant_driver=(value) @vagrant_driver = value end |