lib/mb/bootstrap/manager.rb in motherbrain-0.14.4 vs lib/mb/bootstrap/manager.rb in motherbrain-0.14.5
- old
+ new
@@ -74,11 +74,10 @@
# a motherbrain plugin with a bootstrap routine to follow
#
# @see {#async_bootstrap} for options
def bootstrap(job, environment, manifest, plugin, options = {})
options = options.reverse_merge(
- cookbook_versions: Hash.new,
component_versions: Hash.new,
environment_attributes: Hash.new,
hints: Hash.new,
bootstrap_proxy: Application.config[:chef][:bootstrap_proxy],
sudo: Application.config[:ssh][:sudo],
@@ -102,12 +101,13 @@
if options[:component_versions].any?
job.set_status("Setting component versions")
set_component_versions(environment, plugin, options[:component_versions])
end
- if options[:cookbook_versions].any?
+ cookbook_versions = options[:cookbook_versions] || plugin.cookbook_versions
+ if cookbook_versions.any?
job.set_status("Setting cookbook versions")
- set_cookbook_versions(environment, options[:cookbook_versions])
+ set_cookbook_versions(environment, cookbook_versions)
end
if options[:environment_attributes].any?
job.set_status("Setting environment attributes")
set_environment_attributes(environment, options[:environment_attributes])