I am trying to process a nested data structure and can't find a suitable
syntax to let me do it. Ansible only seems to allow one level of looping,
or two with sub-elements.
Given a data structure like this:
vars:
vpcs:
name: blah
cidr: 10.10.0.0/19
tiers:
- name: tier1
subnets:
- name: subnet1
cidr: 10.10.10.0/24
[... more subnets ...]
[... more tiers ...]
[... more VPCs ...]
... how do I do the equivalent of:
for each VPC
for each tier
for each subnet
create subnet
I.e., three nested levels?
I don't have to do it this way; I can flatten the data structures, but the
data structure is naturally nested, so it would be nice to be able to use
it in that form.
Yours hopefully, K.
--
Karl Auer
Email : [email protected]
Website: http://2pisoftware.com
GPG/PGP : 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816
Previous: F0AB 6C70 A49D 1927 6E05 81E7 AD95 268F 2AB6 40EA
--
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/CA%2B%2BT08S9w-ZTMP0L95jjcKEd%3DAwPz6117Z7DsC4Bowm2Y7gyFQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.