Hi,

Let's say I have a variable structure like this:

vpc_subnets:
  - cidr: *"172.22.1.0/24"*
    az: "us-east-1a"
  - cidr: *"172.22.2.0/24"*
    az: "us-east-1b"
  - cidr: *"172.22.3.0/24"*
    az: "us-east-1c"

... and a task using it:

ec2_vpc:
  ...
  subnets: "{{ vpc_subnets }}"
  route_tables:
    - subnets:
*        - "172.22.1.0/24"*
*        - "172.22.2.0/24"*
*        - "172.22.3.0/24"*
      routes:
        - dest: 0.0.0.0/0
          gw: igw


I would like to avoid repeating the CIDRs in route_tables/subnets, and just 
select all the CIDRs from the vpc_subnets variable. Is there a nice way of 
doing this?

Thanks,
  Viktor

-- 
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/b538a1bc-b45d-4535-947c-c3940a3d80dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to