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

Commit

Permalink
switch rackspace server create to -r RUN_LIST
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsdeleo committed Mar 21, 2011
1 parent 706be8a commit 5375349
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/chef/knife/rackspace_server_create.rb
Expand Up @@ -26,7 +26,7 @@ class Chef
class Knife
class RackspaceServerCreate < Knife

banner "knife rackspace server create [RUN LIST...] (options)"
banner "knife rackspace server create (options)"

option :flavor,
:short => "-f FLAVOR",
Expand Down Expand Up @@ -101,6 +101,13 @@ class RackspaceServerCreate < Knife
:proc => Proc.new { |t| Chef::Config[:knife][:template_file] = t },
:default => false

option :run_list,
:short => "-r RUN_LIST",
:long => "--run-list RUN_LIST",
:description => "Comma separated list of roles/recipes to apply",
:proc => lambda { |o| o.split(/[\s,]+/) },
:default => []

def h
@highline ||= HighLine.new
end
Expand Down Expand Up @@ -185,7 +192,7 @@ def run
def bootstrap_for_node(server)
bootstrap = Chef::Knife::Bootstrap.new
bootstrap.name_args = [public_dns_name(server)]
bootstrap.config[:run_list] = @name_args
bootstrap.config[:run_list] = config[:run_list]
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 5375349

Please sign in to comment.