Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chef 1763 #16

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions chef/lib/chef/knife/ec2_server_create.rb
Expand Up @@ -98,7 +98,8 @@ class Ec2ServerCreate < Knife
option :region,
:long => "--region REGION",
:description => "Your AWS region",
:default => "us-east-1"
:default => "us-east-1",
:proc => Proc.new { |key| Chef::Config[:knife][:region] = key }

option :distro,
:short => "-d DISTRO",
Expand Down Expand Up @@ -145,7 +146,7 @@ def run
connection = Fog::AWS::EC2.new(
:aws_access_key_id => Chef::Config[:knife][:aws_access_key_id],
:aws_secret_access_key => Chef::Config[:knife][:aws_secret_access_key],
:region => config[:region]
:region => Chef::Config[:knife][:region]
)

server = connection.servers.create(
Expand Down
9 changes: 3 additions & 6 deletions chef/lib/chef/knife/ec2_server_delete.rb
Expand Up @@ -40,7 +40,8 @@ class Ec2ServerDelete < Knife
option :region,
:long => "--region REGION",
:description => "Your AWS region",
:default => "us-east-1"
:default => "us-east-1",
:proc => Proc.new { |key| Chef::Config[:knife][:region] = key }

def h
@highline ||= HighLine.new
Expand All @@ -55,7 +56,7 @@ def run
connection = Fog::AWS::EC2.new(
:aws_access_key_id => Chef::Config[:knife][:aws_access_key_id],
:aws_secret_access_key => Chef::Config[:knife][:aws_secret_access_key],
:region => config[:region]
:region => Chef::Config[:knife][:region]
)

@name_args.each do |instance_id|
Expand Down Expand Up @@ -84,7 +85,3 @@ def run
end
end





5 changes: 3 additions & 2 deletions chef/lib/chef/knife/ec2_server_list.rb
Expand Up @@ -40,7 +40,8 @@ class Ec2ServerList < Knife
option :region,
:long => "--region REGION",
:description => "Your AWS region",
:default => "us-east-1"
:default => "us-east-1",
:proc => Proc.new { |key| Chef::Config[:knife][:region] = key }

def h
@highline ||= HighLine.new
Expand All @@ -57,7 +58,7 @@ def run
connection = Fog::AWS::EC2.new(
:aws_access_key_id => Chef::Config[:knife][:aws_access_key_id],
:aws_secret_access_key => Chef::Config[:knife][:aws_secret_access_key],
:region => config[:region]
:region => Chef::Config[:knife][:region]
)

server_list = [
Expand Down