Class: VagrantPlugins::PackerBuild::Config
- Inherits:
-
Object
- Object
- VagrantPlugins::PackerBuild::Config
- Defined in:
- lib/vagrant-packer-plugin/config.rb
Instance Attribute Summary collapse
-
#berksfile ⇒ Object
Returns the value of attribute berksfile.
-
#box_name ⇒ Object
Returns the value of attribute box_name.
-
#box_url ⇒ Object
Returns the value of attribute box_url.
-
#cookbooks_url ⇒ Object
Returns the value of attribute cookbooks_url.
-
#databags_password ⇒ Object
Returns the value of attribute databags_password.
-
#databags_url ⇒ Object
Returns the value of attribute databags_url.
-
#databags_username ⇒ Object
Returns the value of attribute databags_username.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#env_vars ⇒ Object
Returns the value of attribute env_vars.
-
#instance_templates ⇒ Object
Returns the value of attribute instance_templates.
-
#ks_template ⇒ Object
Returns the value of attribute ks_template.
-
#post_commands ⇒ Object
Returns the value of attribute post_commands.
-
#pre_commands ⇒ Object
Returns the value of attribute pre_commands.
-
#why_run ⇒ Object
Returns the value of attribute why_run.
-
#work_dir ⇒ Object
Returns the value of attribute work_dir.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/vagrant-packer-plugin/config.rb', line 7 def initialize @work_dir = UNSET_VALUE @box_url = UNSET_VALUE @box_name = UNSET_VALUE @cookbooks_url = UNSET_VALUE @databags_url = UNSET_VALUE @databags_username = UNSET_VALUE @databags_password = UNSET_VALUE @ks_template = UNSET_VALUE @berksfile = UNSET_VALUE end |
Instance Attribute Details
#berksfile ⇒ Object
Returns the value of attribute berksfile.
5 6 7 |
# File 'lib/vagrant-packer-plugin/config.rb', line 5 def berksfile @berksfile end |
#box_name ⇒ Object
Returns the value of attribute box_name.
5 6 7 |
# File 'lib/vagrant-packer-plugin/config.rb', line 5 def box_name @box_name end |
#box_url ⇒ Object
Returns the value of attribute box_url.
5 6 7 |
# File 'lib/vagrant-packer-plugin/config.rb', line 5 def box_url @box_url end |
#cookbooks_url ⇒ Object
Returns the value of attribute cookbooks_url.
5 6 7 |
# File 'lib/vagrant-packer-plugin/config.rb', line 5 def cookbooks_url @cookbooks_url end |
#databags_password ⇒ Object
Returns the value of attribute databags_password.
5 6 7 |
# File 'lib/vagrant-packer-plugin/config.rb', line 5 def databags_password @databags_password end |
#databags_url ⇒ Object
Returns the value of attribute databags_url.
5 6 7 |
# File 'lib/vagrant-packer-plugin/config.rb', line 5 def databags_url @databags_url end |
#databags_username ⇒ Object
Returns the value of attribute databags_username.
5 6 7 |
# File 'lib/vagrant-packer-plugin/config.rb', line 5 def databags_username @databags_username end |
#debug ⇒ Object
Returns the value of attribute debug.
5 6 7 |
# File 'lib/vagrant-packer-plugin/config.rb', line 5 def debug @debug end |
#env_vars ⇒ Object
Returns the value of attribute env_vars.
5 6 7 |
# File 'lib/vagrant-packer-plugin/config.rb', line 5 def env_vars @env_vars end |
#instance_templates ⇒ Object
Returns the value of attribute instance_templates.
5 6 7 |
# File 'lib/vagrant-packer-plugin/config.rb', line 5 def instance_templates @instance_templates end |
#ks_template ⇒ Object
Returns the value of attribute ks_template.
5 6 7 |
# File 'lib/vagrant-packer-plugin/config.rb', line 5 def ks_template @ks_template end |
#post_commands ⇒ Object
Returns the value of attribute post_commands.
5 6 7 |
# File 'lib/vagrant-packer-plugin/config.rb', line 5 def post_commands @post_commands end |
#pre_commands ⇒ Object
Returns the value of attribute pre_commands.
5 6 7 |
# File 'lib/vagrant-packer-plugin/config.rb', line 5 def pre_commands @pre_commands end |
#why_run ⇒ Object
Returns the value of attribute why_run.
5 6 7 |
# File 'lib/vagrant-packer-plugin/config.rb', line 5 def why_run @why_run end |
#work_dir ⇒ Object
Returns the value of attribute work_dir.
5 6 7 |
# File 'lib/vagrant-packer-plugin/config.rb', line 5 def work_dir @work_dir end |
Instance Method Details
#finalize! ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/vagrant-packer-plugin/config.rb', line 19 def finalize! @work_dir = "#{Dir.home}/.vagrant.d/data/packer-plugin" if @work_dir == UNSET_VALUE @box_url = 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-7.2_chef-provisionerless.box' if @box_url == UNSET_VALUE @box_name = "opscode_centos-7.2" if @box_name == UNSET_VALUE @cookbooks_url = nil if @cookbooks_url == UNSET_VALUE @databags_url = nil if @databags_url == UNSET_VALUE @databags_username = nil if @databags_username == UNSET_VALUE @databags_password = nil if @databags_password == UNSET_VALUE @ks_template = "" if @ks_template == UNSET_VALUE @berksfile = nil if @berksfile == UNSET_VALUE end |