Hi,
I need to loop over a directory with yml files all containing the same variable names (dicts, list, simple vars) e.g.
---- file1.yml ----
serviceconf:
document:
xxx: “{{ ansible_hostname }}”:8080
proxyconf:
- /api/document
---- file2.yml ----
serviceconf:
portalcode:
val: “{{ binary_content_dir }}/special”
proxyconf:
- /api/portalcode
- /api/imports
And would like to have as result:
serviceconf:
document:
xxx: “{{ ansible_hostname }}”:8080
portalcode:
val: “{{ binary_content_dir }}/special”
proxyconf:
-
/api/document1
-
/api/other1
-
/api/portalcode
-
/api/imports
While searching on google, I found include_vars_merged action plugin (https://gist.github.com/udondan/b730206056a018cf9838) which I though could be suitable for my task - but unfortunatly it is not compatible with Ansible 2+.
My question: Is there a possiblity to do the desired task (with standard ansible means) or has someone developed a similiar include_vars_merged for Ansible 2.7+ and like to share it?
Tnx in advance
Frank