Skip to content

Instantly share code, notes, and snippets.

@hh
Created July 25, 2011 04:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hh/1103567 to your computer and use it in GitHub Desktop.
Save hh/1103567 to your computer and use it in GitHub Desktop.
knife-ec2 + databag_dump_load breaks
When I have https://gist.github.com/368740 put in tasks/databag_dump_load.rake AND I use a knife.rb that includes knife[:aws_*] = 'foo' ala http://rubydoc.info/gems/knife-ec2/0.5.6/file/README.rdoc I get errors.
It's interesting that I'm even running rake with --trace and I don't get a stacktrace...
rake --trace
(in /chef-repo)
ERROR: You have an error in your config file /chef-repo/.chef/knife.rb
NoMethodError: undefined method `[]=' for #<Chef::Knife:0x110e7e8>
/home/chris/clients/fanestra/aws/chef-repo/.chef/knife.rb:16:in `from_file'
/home/chris/clients/fanestra/aws/chef-repo/.chef/knife.rb:16:in `from_file'
# /chef-repo/.chef/knife.rb
15: aws_secretfile = "#{current_dir}/aws_secret_access_key"
16: knife[:aws_ssh_key_id] = 'foo'
17: knife[:aws_access_key_id] = 'bar'
ERROR: You have an error in your config file /chef-repo/.chef/knife.rb
SystemExit: exit
/chef-repo/.chef/knife.rb:16:in `from_file'
# /home/chris/clients/fanestra/aws/chef-repo/.chef/knife.rb
15: aws_secretfile = "#{current_dir}/aws_secret_access_key"
16: knife[:aws_ssh_key_id] = 'fanestra20110517'
17: knife[:aws_access_key_id] = 'bar'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment