Merge pull request #6561 from mitchellh/sethvargo/data_bags_array

Support arrays for data_bags_path
This commit is contained in:
Seth Vargo 2015-11-19 16:21:25 -08:00
commit bea375caa9
5 changed files with 11 additions and 8 deletions

View File

@ -165,7 +165,7 @@ module VagrantPlugins
recipe_url: @config.recipe_url, recipe_url: @config.recipe_url,
nodes_path: guest_paths(@node_folders), 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),
environments_path: guest_paths(@environments_folders).first environments_path: guest_paths(@environments_folders).first
} }
end end

View File

@ -13,7 +13,7 @@ verbose_logging <%= verbose_logging.inspect %>
encrypted_data_bag_secret <%= encrypted_data_bag_secret.inspect %> encrypted_data_bag_secret <%= encrypted_data_bag_secret.inspect %>
<% if data_bags_path -%> <% if data_bags_path -%>
data_bag_path <%= data_bags_path.inspect %> data_bag_path <%= data_bags_path.size == 1 ? data_bags_path.first.inspect : data_bags_path.inspect %>
<% end %> <% end %>
<% if recipe_url -%> <% if recipe_url -%>

View File

@ -9,6 +9,7 @@ role_path <%= roles_path.size == 1 ? roles_path.first.inspect : roles_path.inspe
<% end %> <% end %>
log_level <%= log_level.inspect %> log_level <%= log_level.inspect %>
verbose_logging <%= verbose_logging.inspect %> verbose_logging <%= verbose_logging.inspect %>
<% if !enable_reporting %> <% if !enable_reporting %>
enable_reporting <%= enable_reporting.inspect %> enable_reporting <%= enable_reporting.inspect %>
<% end %> <% end %>
@ -16,7 +17,7 @@ enable_reporting <%= enable_reporting.inspect %>
encrypted_data_bag_secret <%= encrypted_data_bag_secret.inspect %> encrypted_data_bag_secret <%= encrypted_data_bag_secret.inspect %>
<% if data_bags_path -%> <% if data_bags_path -%>
data_bag_path <%= data_bags_path.inspect %> data_bag_path <%= data_bags_path.size == 1 ? data_bags_path.first.inspect : data_bags_path.inspect %>
<% end %> <% end %>
<% if environments_path %> <% if environments_path %>

View File

@ -36,8 +36,9 @@ available below this section.
are stored. By default this is "cookbooks", expecting a cookbooks folder are stored. By default this is "cookbooks", expecting a cookbooks folder
relative to the Vagrantfile location. relative to the Vagrantfile location.
* `data_bags_path` (string) - A path where data bags are stored. By default, no * `data_bags_path` (string or array) - A path where data bags are stored. By
data bag path is set. default, no data bag path is set. Chef 12 or higher is required to use the
array option. Chef 11 and lower only accept a string value.
* `environments_path` (string) - A path where environment definitions are * `environments_path` (string) - A path where environment definitions are
located. By default, no environments folder is set. located. By default, no environments folder is set.

View File

@ -35,8 +35,9 @@ available below this section.
are stored. By default this is "cookbooks", expecting a cookbooks folder are stored. By default this is "cookbooks", expecting a cookbooks folder
relative to the Vagrantfile location. relative to the Vagrantfile location.
* `data_bags_path` (string) - A path where data bags are stored. By default, no * `data_bags_path` (string or array) - A path where data bags are stored. By
data bag path is set. default, no data bag path is set. Chef 12 or higher is required to use the
array option. Chef 11 and lower only accept a string value.
* `environments_path` (string) - A path where environment definitions are * `environments_path` (string) - A path where environment definitions are
located. By default, no environments folder is set. located. By default, no environments folder is set.