Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[KNIFE_RACKSPACE-30] Make use of --json-attributes option for knife bootstrap #19

Closed
wants to merge 4 commits into from

3 participants

Commits on Apr 10, 2012
  1. @stormsilver
Commits on Apr 19, 2012
  1. @mattray

    Merge pull request #20 from djoos/patch-1

    mattray authored
    Fix of small typo "backspace" > "rackspace".
Commits on May 3, 2012
  1. @stormsilver
  2. @stormsilver

    Merge branch 'KNIFE_RACKSPACE-30' of github.com:stormsilver/knife-rac…

    stormsilver authored
    …kspace into KNIFE_RACKSPACE-30
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/chef/knife/rackspace_server_create.rb
View
8 lib/chef/knife/rackspace_server_create.rb
@@ -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",
@@ -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]
Something went wrong with that request. Please try again.