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

Added private_ip_address support. #84

Merged
merged 1 commit into from
Mar 25, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,12 @@ The EC2 [subnet][subnet_docs] to use.

The default is unset, or `nil`.

### <a name="config-private-ip-address"></a> private\_ip\_address

The primary private IP address of your instance.

If you don't set this it will default to whatever DHCP address EC2 hands out.

### <a name="config-tags"></a> tags

The Hash of EC tag name/value pairs which will be applied to the instance.
Expand Down
4 changes: 4 additions & 0 deletions lib/kitchen/driver/ec2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class Ec2 < Kitchen::Driver::SSHBase
default_config :security_group_ids, ['default']
default_config :tags, { 'created-by' => 'test-kitchen' }
default_config :user_data, nil
default_config :private_ip_address, nil
default_config :iam_profile_name, nil
default_config :price, nil
default_config :aws_access_key_id do |driver|
Expand Down Expand Up @@ -155,6 +156,7 @@ def create_server
:flavor_id => config[:flavor_id],
:ebs_optimized => config[:ebs_optimized],
:image_id => config[:image_id],
:private_ip_address => config[:private_ip_address],
:key_name => config[:aws_ssh_key_id],
:subnet_id => config[:subnet_id],
:iam_instance_profile_name => config[:iam_profile_name],
Expand Down Expand Up @@ -182,6 +184,7 @@ def request_spot
:flavor_id => config[:flavor_id],
:ebs_optimized => config[:ebs_optimized],
:image_id => config[:image_id],
:private_ip_address => config[:private_ip_address],
:key_name => config[:aws_ssh_key_id],
:subnet_id => config[:subnet_id],
:iam_instance_profile_name => config[:iam_profile_name],
Expand All @@ -201,6 +204,7 @@ def debug_server_config
debug("ec2:flavor_id '#{config[:flavor_id]}'")
debug("ec2:ebs_optimized '#{config[:ebs_optimized]}'")
debug("ec2:image_id '#{config[:image_id]}'")
debug("ec2:private_ip_address '#{config[:private_ip_address]}'")
debug("ec2:security_group_ids '#{config[:security_group_ids]}'")
debug("ec2:tags '#{config[:tags]}'")
debug("ec2:key_name '#{config[:aws_ssh_key_id]}'")
Expand Down