Class: Vagrant::Provisioners::ChefSolo::Config
- Inherits:
-
Vagrant::Provisioners::Chef::Config
- Object
- Config::Base
- Vagrant::Provisioners::Chef::Config
- Vagrant::Provisioners::ChefSolo::Config
- Defined in:
- lib/vagrant/provisioners/chef_solo.rb
Instance Attribute Summary collapse
-
#cookbooks_path ⇒ Object
Returns the value of attribute cookbooks_path.
-
#data_bags_path ⇒ Object
Returns the value of attribute data_bags_path.
-
#nfs ⇒ Object
Returns the value of attribute nfs.
-
#recipe_url ⇒ Object
Returns the value of attribute recipe_url.
-
#roles_path ⇒ Object
Returns the value of attribute roles_path.
Attributes inherited from Vagrant::Provisioners::Chef::Config
#binary_env, #binary_path, #http_proxy, #http_proxy_pass, #http_proxy_user, #https_proxy, #https_proxy_pass, #https_proxy_user, #json, #log_level, #no_proxy, #node_name, #provisioning_path, #run_list
Attributes inherited from Config::Base
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #validate(errors) ⇒ Object
Methods inherited from Vagrant::Provisioners::Chef::Config
#add_recipe, #add_role, #instance_variables_hash, #merged_json
Methods inherited from Config::Base
configures, #env, #instance_variables_hash, json_create, #set_options, #to_hash, #to_json
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
17 18 19 20 21 22 23 24 |
# File 'lib/vagrant/provisioners/chef_solo.rb', line 17 def initialize super @cookbooks_path = ["cookbooks", [:vm, "cookbooks"]] @roles_path = nil @data_bags_path = nil @nfs = false end |
Instance Attribute Details
#cookbooks_path ⇒ Object
Returns the value of attribute cookbooks_path.
11 12 13 |
# File 'lib/vagrant/provisioners/chef_solo.rb', line 11 def cookbooks_path @cookbooks_path end |
#data_bags_path ⇒ Object
Returns the value of attribute data_bags_path.
13 14 15 |
# File 'lib/vagrant/provisioners/chef_solo.rb', line 13 def data_bags_path @data_bags_path end |
#nfs ⇒ Object
Returns the value of attribute nfs.
15 16 17 |
# File 'lib/vagrant/provisioners/chef_solo.rb', line 15 def nfs @nfs end |
#recipe_url ⇒ Object
Returns the value of attribute recipe_url.
14 15 16 |
# File 'lib/vagrant/provisioners/chef_solo.rb', line 14 def recipe_url @recipe_url end |
#roles_path ⇒ Object
Returns the value of attribute roles_path.
12 13 14 |
# File 'lib/vagrant/provisioners/chef_solo.rb', line 12 def roles_path @roles_path end |
Instance Method Details
#validate(errors) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/vagrant/provisioners/chef_solo.rb', line 26 def validate(errors) super errors.add(I18n.t("vagrant.config.chef.cookbooks_path_empty")) if !cookbooks_path || [cookbooks_path].flatten.empty? errors.add(I18n.t("vagrant.config.chef.run_list_empty")) if !run_list || run_list.empty? end |