Class: VagrantProvision::RakeTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- VagrantProvision::RakeTask
- Includes:
- DaptivChefCI::RakeTaskHelpers, Rake::DSL
- Defined in:
- lib/daptiv-chef-ci/vagrant_provision_task.rb
Overview
Example usage, provisions a vmware box (box must already be up):
VagrantProvision::RakeTask.new ‘provision’ do |t|
t.provision_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.
-
#provision_timeout_in_seconds ⇒ Object
Returns the value of attribute provision_timeout_in_seconds.
-
#vagrant_driver ⇒ Object
writeonly
Sets the attribute vagrant_driver.
Instance Method Summary collapse
-
#initialize(name = 'vagrant_provision', desc = 'Vagrant provision task') {|_self| ... } ⇒ RakeTask
constructor
virtualbox provider.
Methods included from DaptivChefCI::RakeTaskHelpers
#execute, #exit_on_failure, #exit_on_failure=
Constructor Details
#initialize(name = 'vagrant_provision', desc = 'Vagrant provision task') {|_self| ... } ⇒ RakeTask
virtualbox provider
29 30 31 32 33 34 35 |
# File 'lib/daptiv-chef-ci/vagrant_provision_task.rb', line 29 def initialize(name = 'vagrant_provision', desc = 'Vagrant provision task') @name, @desc = name, desc @provision_timeout_in_seconds = 7200 @environment = {} yield self if block_given? define_task end |
Instance Attribute Details
#environment ⇒ Object
Returns the value of attribute environment.
23 24 25 |
# File 'lib/daptiv-chef-ci/vagrant_provision_task.rb', line 23 def environment @environment end |
#provision_timeout_in_seconds ⇒ Object
Returns the value of attribute provision_timeout_in_seconds.
22 23 24 |
# File 'lib/daptiv-chef-ci/vagrant_provision_task.rb', line 22 def provision_timeout_in_seconds @provision_timeout_in_seconds end |
#vagrant_driver=(value) ⇒ Object
Sets the attribute vagrant_driver
21 22 23 |
# File 'lib/daptiv-chef-ci/vagrant_provision_task.rb', line 21 def vagrant_driver=(value) @vagrant_driver = value end |