lib/simple_deploy/stack.rb in simple_deploy-0.5.3 vs lib/simple_deploy/stack.rb in simple_deploy-0.5.4

- old
+ new

@@ -8,10 +8,12 @@ def initialize(args) @environment = args[:environment] @name = args[:name] @config = Config.new :logger => args[:logger] @logger = @config.logger + + @use_internal_ips = !!args[:internal] end def create(args) attributes = stack_attribute_formater.updated_attributes args[:attributes] stack.create :attributes => attributes, @@ -64,10 +66,15 @@ end def instances stack.instances.map do |instance| info = instance['instancesSet'].first - info['vpcId'] ? info['privateIpAddress'] : info['ipAddress'] + + if info['vpcId'] || @use_internal_ips + info['privateIpAddress'] + else + info['ipAddress'] + end end end def status stack.status