Class: VagrantPlugins::PackerBuild::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-packer-plugin/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

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

#berksfileObject

Returns the value of attribute berksfile.



5
6
7
# File 'lib/vagrant-packer-plugin/config.rb', line 5

def berksfile
  @berksfile
end

#box_nameObject

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_urlObject

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_urlObject

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_passwordObject

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_urlObject

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_usernameObject

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

#debugObject

Returns the value of attribute debug.



5
6
7
# File 'lib/vagrant-packer-plugin/config.rb', line 5

def debug
  @debug
end

#env_varsObject

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_templatesObject

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_templateObject

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_commandsObject

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_commandsObject

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_runObject

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_dirObject

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