Unsure how to merge this dict/list into a single dict/list

`

  • name: Jinja Example Playbook
    hosts: localhost
    connection: local
    vars_files:
  • test-role/defaults/container.yml
  • test-role/defaults/container_env.yml
    vars:
    combined_containers: “{{ (containers + container_env) | unique}}”

tasks:

  • name: Container file
    debug:
    msg: “{{containers}}”
  • name: Container env file
    debug:
    msg: “{{container_env}}”
  • name: Combined
    debug:
    msg: “{{combined_containers}}”
  • debug:
    msg: “{{item.name}} - {{item.version}} - {{item.env}}”
    with_items:
  • “{{combined_containers}}”
    `

`

container_env:

  • name: httpd
    env: Phil
  • name: httpd
    env: Phil
    `

`

It sounds like you are looking to do something like this:

https://github.com/chepazzo/ansible-filters-extras/blob/master/filter_plugins/listofdicts.py#L121