`
- 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
`
`