Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

Commit

Permalink
Merge branch 'stormsilver/KNIFE_RACKSPACE-30'
Browse files Browse the repository at this point in the history
  • Loading branch information
stevendanna committed May 15, 2012
2 parents 02ab243 + 282697f commit 3bd698f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* updated for rackspace_api_username and the correct current image number for Ubuntu 10.04 LTS
* KNIFE-RACKSPACE-26 fog doesn't provide cores enumeration anymore
* updated copyright and removed trailing comma
* KNIFE_RACKSPACE-30 Make use of --json-attributes option for knife
bootstrap.

## v0.5.12
* remove dependency on net-ssh and net-ssh-multi..neither is access directly in plugin
Expand Down
8 changes: 8 additions & 0 deletions lib/chef/knife/rackspace_server_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ class RackspaceServerCreate < Knife
:description => "Comma separated list of roles/recipes to apply",
:proc => lambda { |o| o.split(/[\s,]+/) },
:default => []

option :first_boot_attributes,
:short => "-j JSON_ATTRIBS",
:long => "--json-attributes",
:description => "A JSON string to be added to the first run of chef-client",
:proc => lambda { |o| JSON.parse(o) },
:default => {}

option :rackspace_metadata,
:short => "-M JSON",
Expand Down Expand Up @@ -192,6 +199,7 @@ def bootstrap_for_node(server)
bootstrap = Chef::Knife::Bootstrap.new
bootstrap.name_args = [public_dns_name(server)]
bootstrap.config[:run_list] = config[:run_list]
bootstrap.config[:first_boot_attributes] = config[:first_boot_attributes]
bootstrap.config[:ssh_user] = config[:ssh_user] || "root"
bootstrap.config[:ssh_password] = server.password
bootstrap.config[:identity_file] = config[:identity_file]
Expand Down

0 comments on commit 3bd698f

Please sign in to comment.