On Thu, 20 Jun 2019 at 12:14, Dick Visser <[email protected]> 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

-- 
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/CAL8fbwOXB%3Dd3rs1%2BkmQrv0VKhiL9_QJDw%2BM5Bws9WhkLeTcZUg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to