Add `nodes_path` support for the Chef-Solo provisioner
This commit is contained in:
parent
01f0dccbdc
commit
fd593a85b7
|
@ -17,6 +17,10 @@ module VagrantPlugins
|
||||||
# @return [String]
|
# @return [String]
|
||||||
attr_accessor :environments_path
|
attr_accessor :environments_path
|
||||||
|
|
||||||
|
# The path where nodes are stored on disk.
|
||||||
|
# @return [String]
|
||||||
|
attr_accessor :nodes_path
|
||||||
|
|
||||||
# A URL download a remote recipe from. Note: you should use chef-apply
|
# A URL download a remote recipe from. Note: you should use chef-apply
|
||||||
# instead.
|
# instead.
|
||||||
#
|
#
|
||||||
|
@ -39,6 +43,7 @@ module VagrantPlugins
|
||||||
@cookbooks_path = UNSET_VALUE
|
@cookbooks_path = UNSET_VALUE
|
||||||
@data_bags_path = UNSET_VALUE
|
@data_bags_path = UNSET_VALUE
|
||||||
@environments_path = UNSET_VALUE
|
@environments_path = UNSET_VALUE
|
||||||
|
@nodes_path = UNSET_VALUE
|
||||||
@recipe_url = UNSET_VALUE
|
@recipe_url = UNSET_VALUE
|
||||||
@roles_path = UNSET_VALUE
|
@roles_path = UNSET_VALUE
|
||||||
@synced_folder_type = UNSET_VALUE
|
@synced_folder_type = UNSET_VALUE
|
||||||
|
@ -86,6 +91,7 @@ module VagrantPlugins
|
||||||
end
|
end
|
||||||
|
|
||||||
@data_bags_path = [] if @data_bags_path == UNSET_VALUE
|
@data_bags_path = [] if @data_bags_path == UNSET_VALUE
|
||||||
|
@nodes_path = [] if @nodes_path == UNSET_VALUE
|
||||||
@roles_path = [] if @roles_path == UNSET_VALUE
|
@roles_path = [] if @roles_path == UNSET_VALUE
|
||||||
@environments_path = [] if @environments_path == UNSET_VALUE
|
@environments_path = [] if @environments_path == UNSET_VALUE
|
||||||
@environments_path = [@environments_path].flatten
|
@environments_path = [@environments_path].flatten
|
||||||
|
@ -93,6 +99,7 @@ module VagrantPlugins
|
||||||
# Make sure the path is an array.
|
# Make sure the path is an array.
|
||||||
@cookbooks_path = prepare_folders_config(@cookbooks_path)
|
@cookbooks_path = prepare_folders_config(@cookbooks_path)
|
||||||
@data_bags_path = prepare_folders_config(@data_bags_path)
|
@data_bags_path = prepare_folders_config(@data_bags_path)
|
||||||
|
@nodes_path = prepare_folders_config(@nodes_path)
|
||||||
@roles_path = prepare_folders_config(@roles_path)
|
@roles_path = prepare_folders_config(@roles_path)
|
||||||
@environments_path = prepare_folders_config(@environments_path)
|
@environments_path = prepare_folders_config(@environments_path)
|
||||||
end
|
end
|
||||||
|
|
|
@ -19,6 +19,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
attr_reader :environments_folders
|
attr_reader :environments_folders
|
||||||
attr_reader :cookbook_folders
|
attr_reader :cookbook_folders
|
||||||
|
attr_reader :node_folders
|
||||||
attr_reader :role_folders
|
attr_reader :role_folders
|
||||||
attr_reader :data_bags_folders
|
attr_reader :data_bags_folders
|
||||||
|
|
||||||
|
@ -160,6 +161,7 @@ module VagrantPlugins
|
||||||
{
|
{
|
||||||
cookbooks_path: guest_paths(@cookbook_folders),
|
cookbooks_path: guest_paths(@cookbook_folders),
|
||||||
recipe_url: @config.recipe_url,
|
recipe_url: @config.recipe_url,
|
||||||
|
nodes_path: guest_paths(@node_folders),
|
||||||
roles_path: guest_paths(@role_folders),
|
roles_path: guest_paths(@role_folders),
|
||||||
data_bags_path: guest_paths(@data_bags_folders).first,
|
data_bags_path: guest_paths(@data_bags_folders).first,
|
||||||
environments_path: guest_paths(@environments_folders).first
|
environments_path: guest_paths(@environments_folders).first
|
||||||
|
|
|
@ -31,8 +31,8 @@ environment "<%= environment %>"
|
||||||
<% if local_mode -%>
|
<% if local_mode -%>
|
||||||
local_mode true
|
local_mode true
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if node_path -%>
|
<% if nodes_path -%>
|
||||||
node_path <%= node_path.inspect %>
|
node_path <%= nodes_path.inspect %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
http_proxy <%= http_proxy.inspect %>
|
http_proxy <%= http_proxy.inspect %>
|
||||||
|
|
Loading…
Reference in New Issue