ansible/ansible — pull request #6920 by jimbydamonk (2014-04-09 14:59:52+00:00)
Title: Added support for VPC subnets

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