I just ran a playbook I have not run in awhile, and 2.19 bit me
I cant figure out how to re-write this and make it work again. Any help would be appreciated.
I have a group_vars file that has data like this:
__ds_defaults:
clob: false
connectionLimit: -1
validate: false
my_config:
ds_sources: >
{
{% for ds_name, ds_values in __env_ds.items() %}
'{{ ds_name }}': {{
__ds_defaults |
combine(ds_values)|
combine({
'some_url': 'https://' + ds_values.host + ':' + ds_values.port
})
}},
{% endfor %}
}
And then my playbook will define some __env_ds like
__env_ds:
one:
a: 1
host: example.com
port: 443
clob: true
When I ran my playbook, I would use copy to dump my_config | to_nice_json to a file. ds_sources would be rendered as a dict/object in the json as expected.
With 2.19, its being rendered as a string in the config file. What can I do to fix this?