Hi all,
I’m fancing with the following problem. Imagine, you have following tak
- name: template everything for fooserv
template: src={{item.0}} dest={{item.1}}
with_items:
- [ 'templates/foo.j2', '/etc/splat/foo.conf' ]
- [ 'templates/bar.j2', '/etc/splat/bar.conf’ ]
Or
- name: template everything for fooserv
template: src={{item.src}} dest={{item.dest}}
with_items:
- { src: 'templates/foo.j2', b: '/etc/splat/foo.conf' }
- { src: 'templates/bar.j2', b: '/etc/splat/bar.conf' }
The question is, is there a way how to access the {{ item }} in template
file ?
Thanks,
Peter