Skip to content

Commit

Permalink
Merge pull request #84 from scarolan/add_private_ip
Browse files Browse the repository at this point in the history
Added private_ip_address support.
  • Loading branch information
tyler-ball committed Mar 25, 2015
2 parents abc4115 + ad7341a commit 36dbfb4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -236,6 +236,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
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 @@ -179,6 +180,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 All @@ -202,6 +204,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 @@ -221,6 +224,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

0 comments on commit 36dbfb4

Please sign in to comment.