All the looping constructs (with_items etc) assume you have some data
structure that is iterable, ie. a list, a dict, etc.
From your vars file it seems (guessing here) that you want to iterate
over multiple independent variables.
If that is the case, I would suggest restructuring those multiple vars
to one iterable var.
This will give you a lot more flexibility elsewhere in your deployment as well.
For example:
allsizes:
- config: "DC2019"
name: small2019
InstallMedia:
Source: "\\\\someshare\\"
SourceVHDX: "Virtual Hard Disks\\DC2019.vhdx"
Destination: "C:\\ISOs\\MDT\\DC2019\\"
- config: "DC2019"
name: large2019
InstallMedia:
Source: "\\\\someshare\\"
SourceVHDX: "Virtual Hard Disks\\DC2019.vhdx"
Destination: "C:\\ISOs\\MDT\\DC2019\\"
(Note that apart from the name (which used to be your variable name),
the dicts are exactly the same - I guess this is just example data and
in reality these actually differ)
If this is now what you want, then explain better what you do want. I
would help if you provide real world examples.
>>> >
ansible...@googlegroups.com <mailto:
ansible-proje...@googlegroups.com>.
> --
> 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
ansible-proje...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/1d6bc36e-a1f0-47f8-a146-b8b8f1c6cd91%40googlegroups.com.
--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT