Dear all, I have a task that is supposed to be running with_nested, aka with two lists it should loop through:
###############################
- name: "Some task with_nested"
...
with_nested:
- "{{ first_variable }}"
- { ".config/", ".config/autostart-scripts/",
".config/plasma-workspace/", ".config/plasma-workspace/shutdown/" }
###############################
The variable first_variable is defined elsewhere.
In order to avoid a looooong line containing all .config-directories,
I tried adding the second list as above. But it fails, it just uses
the literal string "second_list".
###############################
- name: "Some task with_nested"
...
with_nested:
- "{{ first_variable }}"
- second_list:
- ".config/"
- ".config/autostart-scripts/"
- ".config/plasma-workspace/"
- ".config/plasma-workspace/shutdown/"
###############################
How should the syntax be to achieve readability and correct looping?
Thanks,
Johannes
--
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/3245a021-3929-bad3-6671-9d0c234ac04a%40ojkastl.de.
For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: OpenPGP digital signature
