Hi Lorin,

It looks like your question is similar to 
mine: https://groups.google.com/d/msg/ansible-project/Xy3kt0Mr8YY/eB6TqMN0Y3EJ
Didn't had the time to explore potential fixes yet though...
Perhaps you have some updates from your side.

Cheers,

Dan.

On Friday, 14 November 2014 04:47:03 UTC+1, Lorin Hochstein wrote:
>
> Let's say I create an ec2 vpc like this:
>
>   tasks:
>   - name: create a vpc
>     ec2_vpc:
>       internet_gateway: True
>       resource_tags: { env: production }
>       cidr_block: 10.0.0.0/16
>       subnets:
>         - cidr: 10.0.0.0/24
>           resource_tags:
>             env: production
>             tier: web
>         - cidr: 10.0.1.0/24
>           resource_tags:
>             env: production
>             tier: db
>       route_tables:
>         - subnets:
>           - 10.0.0.0/24
>           - 10.0.1.0/24
>           routes:
>           - dest: 0.0.0.0/0
>             gw: igw
>     register: vpc
>
>
> Later in the play, I want to create an instance inside of subnet 
> 10.0.0.0/24 (web tier):
>
>     ec2:
>       image: "{{ ubuntu_image.ami }}"
>       instance_type: "{{ instance_type }}"
>       assign_public_ip: True
>       key_name: mykey
>       group: [web, ssh]
>       instance_tags: { type: web, env: production }
>       exact_count: "{{ count }}"
>       count_tag: { type: web }
>       vpc_subnet_id: "{{ vpc.subnets[0].id}}"
>
> Is vpc.subnets[0] guaranteed to correspond to the first subnet that was 
> created (10.0.0.0/24)? If not, is there a way I can specify "the vpc 
> subnet that corresponds to resource tag {env: production, tier: web}?"
>
>
> Lorin
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/68085884-14fc-4c9a-aa34-855ea88ef1f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to