summaryrefslogtreecommitdiff
path: root/lib/chef/knife/bootstrap.rb
diff options
context:
space:
mode:
authorsawanoboly <sawanoboriyu@higanworks.com>2015-09-09 18:21:26 +0900
committerLamont Granquist <lamont@scriptkiddie.org>2015-10-24 20:25:11 -0700
commit219e84f17be85ca1a14986e63b087856748263ef (patch)
tree65325e7b79246e5b5966d18060cfd00275bf7133 /lib/chef/knife/bootstrap.rb
parent4731e4bbe5a240ea9b1a725be6c41246ef4fe4a5 (diff)
downloadchef-219e84f17be85ca1a14986e63b087856748263ef.tar.gz
write spec for --json-attribute-file and move configration under render_template
Diffstat (limited to 'lib/chef/knife/bootstrap.rb')
-rw-r--r--lib/chef/knife/bootstrap.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb
index ea623b4f3e..b116ce3866 100644
--- a/lib/chef/knife/bootstrap.rb
+++ b/lib/chef/knife/bootstrap.rb
@@ -348,6 +348,7 @@ EOS
end
def render_template
+ @config[:first_boot_attributes].merge!(@config[:first_boot_attributes_from_file]) if @config[:first_boot_attributes_from_file]
template_file = find_template
template = IO.read(template_file).chomp
Erubis::Eruby.new(template).evaluate(bootstrap_context)
@@ -357,7 +358,6 @@ EOS
if @config[:first_boot_attributes].any? && @config[:first_boot_attributes_from_file]
raise Chef::Exceptions::BootstrapCommandInputError, jsonstring_and_jsonfile_msg
end
- @config[:first_boot_attributes].merge!(@config[:first_boot_attributes_from_file]) if @config[:first_boot_attributes_from_file]
validate_name_args!
validate_options!