Hello,
I want to merge hashes of config files. My ansible.cfg includes this line:
The ansible.cfg file is in the same directory as my playbook, in other words, the current directly where I'm cd'ed in when running ansible-playbook. I confirmed it's being used by adding a syntax error which ansible then complains about. ANSIBLE_CONFIG is empty so it should be the first and last to check.
But my hash is not merged, but overridden.
In my example I have 3 tasks:
- include_vars: /path/to/file/A
- include_vars: /path/to/file/B
- debug: var=test
Content of file A:
Content of file B:
When I run my playbook, this is the result:
TASK: [include_vars /path/to/file/A] ***
ok: [test1.local]
TASK: [include_vars /path/to/file/B] ***
ok: [test1.local]
TASK: [debug var=test] ******************************************
ok: [test1.local] => {
"test": {
"b": 1
}
}
Is this expected? How can I archive that the hash is merged and the resulting value is
Thanks,
Daniel