title: Using listed YAML variables for Jinja templating
body: <p>So I can't seem to find my way round this frustrating problem and I'm wondering if anyone on here has any ideas.
  I have a Jinja template that spits out a long list of IP address in a config file format. This works fine. The issue is that when I have a customer with more than one IP address stored to their name the template, rather than saving this new ip on a new line, simply appends the second IP on to the first one and puts out one line with two IP addresses joined together. This is of course not ideal.
  Below is the Jinja template I am using:</p>
  
  <pre><code>{% for cust, config in customers.items()%}
  {% raw %}#{% endraw %} {{ cust }} - {{ config['type'] }}
  -A INPUT -s {{ config['ipaddr'] }} -p tcp -m state --state NEW -m tcp --dport {{config['accept']}} ACCEPT
  {% endfor %}
  </code></pre>
  
  <p>And this is the variables file from which the template is taking the values:</p>
  
  <pre><code>BTG-VELOCITY:
      type: PBSTP
      accept: 32500
      connect: 33500
      ipaddr: 
        196.167.203.65
        192.167.203.65
      subtype: OUTBOUND
  GFAM:
      type: SPOT
      accept: 32501
      connect: 33501
      ipaddr: 192.168.563.20
      subtype: AMOUNT
  GUANFABANK:
      type: SPOT
      accept: 32503
      connect: 33503
      ipaddr: 192.168.563.40
      subtype: STACKED
  MAINBANK:
      type: FWD
      accept: 32504
      connect: 33504
      ipaddr: 192.167.203.02
      subtype: TIERED
  TEST-BANK:
      type: PBSTP
      accept: 32506
      connect: 33506
      ipaddr: 192.167.203.92
      subtype: INBOUND
  SESH:
      type: SPOT
      accept: 32508
      connect: 33508
      ipaddr: 192.167.203.63
      subtype: TIERED
  </code></pre>
  
  <p>The issue is with the customer 'BTG-VELOCITY'. The template spits out one line like this</p>
  
  <pre><code>-A INPUT -s 192.168.563.20 196.168.563.20 -p tcp -m state --state NEW -m tcp --dport 32501 ACCEPT
  </code></pre>
  
  <p>Rather than the desired two lines like this:</p>
  
  <pre><code>-A INPUT -s 192.168.563.20 -p tcp -m state --state NEW -m tcp --dport 32501 ACCEPT
  -A INPUT -s 196.168.563.20 -p tcp -m state --state NEW -m tcp --dport 32501 ACCEPT
  </code></pre>