title: Ansible/Jinja2 How to format a list into fields for my config file?
body: <p>I have the following and keep in mind I do not know how many ips will be in this incoming variable but I am starting with 2 for simplicity.</p>
  
  <pre><code>vars:
    host_ips: ['10.0.0.100', '10.0.0.200']
  </code></pre>
  
  <p>I'm trying to format them in a file using a template with Ansible.</p>
  
  <pre><code>- targets: ['10.0.0.100:9090', '10.0.0.200:9090']
  </code></pre>
  
  <p>What syntax in Jinja2 do I use to make the host ips look like the above targets line?  I KNOW I have to iterate for sure.</p>