From 5375349752f13fbaf387eae87b482f40ad85d11a Mon Sep 17 00:00:00 2001 From: Daniel DeLeo Date: Mon, 21 Mar 2011 16:38:24 -0700 Subject: [PATCH] switch rackspace server create to -r RUN_LIST --- lib/chef/knife/rackspace_server_create.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/chef/knife/rackspace_server_create.rb b/lib/chef/knife/rackspace_server_create.rb index a992a4d..8726d14 100644 --- a/lib/chef/knife/rackspace_server_create.rb +++ b/lib/chef/knife/rackspace_server_create.rb @@ -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", @@ -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 @@ -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]