ansible/ansible — pull request #7051 by jimbydamonk (2014-04-18 14:04:04+00:00)
Title: Adds support for VPC subnets to ELB

Adds support through boto for VPC subnets.

- name: Create ELB
local_action:
module: ec2_elb_lb
state: present
name: 'New ELB'
security_group_ids: 'sg-123456, sg-67890'
region: us-west-2
subnets: 'subnet-123456, subnet-67890'
listeners:
- protocol: http
load_balancer_port: 80
instance_port: 80
Or of you have created the through ec2-vpc and register a vpc variable

- name: Create ELB
local_action:
module: ec2_elb_lb
state: present
name: 'New ELB'
security_group_ids: 'sg-123456, sg-67890'
region: us-west-2
subnets: "{{ vpc.subnets | join(',', attribute='id') }}"
listeners:
- protocol: http
load_balancer_port: 80
instance_port: 80