On Thu, 20 Jun 2019 at 12:14, Dick Visser <
dick....@geant.org> wrote:
>
> You’re setting a dict to one of its own keys - I think that doesn’t work or at least results in nothing. But the union of that and dns_parsed will be the dns_parsed.
>
> You could look into the ‘combine’ filter to overwrite a specific key.
My first assumption was wrong. But the combine filter is the way,
you'd have to use the recursive option and create the containing dict,
like this:
- set_fact:
actual_config: "{{ actual_config | combine({'dns': {
'servers': dns_parsed }}, recursive=True) }}"
Dick