Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Unknown
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 10.14.0
-
Component/s: None
-
Labels:None
Description
I downloaded ubuntu12.04-gems.erb from github to bootstrap a server running the latest version of ubuntu.
knife bootstrap -VV 192.168.1.5 --ssh-user mark --identity-file ... --sudo --no-host-key-verify --template-file ubuntu12.04-gems.erb DEBUG: Using configuration from /home/mark/.chef/knife.rb Bootstrapping Chef on ^[[1m192.168.1.5^[[0m DEBUG: Looking for bootstrap template in . DEBUG: Found bootstrap template in . (erubis):37:in `evaluate': undefined method `each' for nil:NilClass (NoMethodError) from /usr/lib/ruby/gems/1.8/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:in `instance_eval' from /usr/lib/ruby/gems/1.8/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:in `evaluate' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife/bootstrap.rb:139:in `render_template' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife/bootstrap.rb:196:in `ssh_command' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife/bootstrap.rb:177:in `knife_ssh' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife/bootstrap.rb:154:in `run' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife.rb:391:in `run_with_pretty_exceptions' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife.rb:166:in `run' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/application/knife.rb:128:in `run' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/knife:25 from /usr/bin/knife:19:in `load' from /usr/bin/knife:19
It appears that the check @chef_config[:knife][:hints].nil? in the template should cover both the directory creation and the iteration. Currently it only checks before creating /etc/chef/ohai/hints. I will have a pull request with the change shortly.
Added pull request on github:
https://github.com/opscode/chef/pull/339