Hello together,
i'd like to combine two lists directly in a vars section/file.
I've tried the combine filter but as i understood it, it is for dicts and
not lists.
Also the union filter did not worked for me as i tried it
I assume that i did something wrong.
Can someone here make the example below fly?
---
- name: combine lists
hosts: localhost
vars:
- level1keyA:
- hostname: foo
state: present
path:
- left
- hostname: bar
state: present
addonpath:
- righthere
path:
- "{{ WHAT TO WRITE HERE? }}"
- level1keyB:
- right
- middle
- top
tasks:
- name: result of level1keyA
debug:
msg: "{{ level1keyA }}"
- name: result of level1keyB
debug:
msg: "{{ level1keyB }}"
It would be great if the task could be solved within the vars itself
without editing the playbook using them.
Thank you very much!
Best
Jard
--
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/522f637a-8380-43da-b107-8032cfa78545%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.