title: Template an individual template per item in a list (Jinja2, Anisble)
body: <p>I have a Jinja template as follows</p>
  
  <pre><code>{% for cust, config in customers.items() %}
  sim.gw.{{ cust|lower }}.mw.tport.type=udp
  sim.gw.{{ cust|lower }}.mw.tport.udp.interface=lo
  {% if config['accept'] is defined %}
  sim.gw.{{ cust|lower }}.fix.accept_port={{ config['accept'] }}
  {% endif %}
  sim.gw.{{ cust|lower }}.fix.version=4.4
  sim.gw.{{ cust|lower }}.fix.tagetsubid={{ config['type'] }}
  sim.gw.{{ cust|lower }}.fix.sess.sendercompid0=CITIFX-UAT
  sim.gw.{{ cust|lower }}.fix.sess.targetcompid0={{ cust }}-S-QUOTE
  sim.gw.{{ cust|lower }}.fix.sess.sendercompid1=CITIFX-UAT
  sim.gw.{{ cust|lower }}.fix.sess.targetcompid1={{ cust }}-S-TRADE
  sim.gw.{{ cust|lower }}.fix.handler=libfixpythonhandler.so
  sim.gw.{{ cust|lower }}.fix.py_script=pySimulator.py
  sim.gw.{{ cust|lower }}.log={{ cust|lower }}.log
  {% endfor %}
  </code></pre>
  
  <p>That is using variables found in this customer yml file:</p>
  
  <pre><code>BTG-VELOCITY:
      type: PBSTP
      accept: 1010
  GFAM:
      type: PBSTP
      connect: 1010
  ONEZERO2:
      type: TRADESTREAM
  GUANFABANK:
      type: FXSIM
  MAINBANK:
      type: FXSIM
  TYPOBANK:
      type: TRADESTREAM
  TEST-BANK:
      type: PBSTP
      connect: 32620
      accept: 33620
  WEAKBANK:
      type: TRADESTREAM
  </code></pre>
  
  <p>And when I run my playbook I am using this configuration:</p>
  
  <pre><code>- include_vars:
      file: /home/vagrant/stunnelSimAnsPractice/roles/ns16/vars/customers.yml
      name: customers
  - name: templating
    template:
      src: /home/vagrant/stunnelSimAnsPractice/roles/ns16/templates/simulator.properties.j2
      dest: /home/vagrant/stunnelSimAnsPractice/roles/ns16/sessions/{{ item }}/simulator.properties
      owner: root
      group: root
    register: result
    with_items: "{{ customers }}"
  </code></pre>
  
  <p>My problem is that I wish to create an individual 'simulator.properties' for each customer. At present my playbook generates one long simulator.properties containing all properties for all customers and places the same file in each customer directory. The output should unique to each customer so that each directory contains only the given customer's properties. Is there any way to do this?</p>