title: ansible read (more than one) values from a line in file
body: <p>i am trying to read variables from a file into an array of something, but not into a pre defined variable.</p>
  
  <p>The goal is a playbook, that searches for lines with item.0 and NOT item.1 and deletes them, later the playbook makes sure, that a line with item.0 item.1 is present, thats why i need this splitted.</p>
  
  <p>For example i have a file with lines like this:</p>
  
  <pre><code>Parameter Value
  Parameter Value
  Parameter Value
  </code></pre>
  
  <p>to use this in a loop until EOF.</p>
  
  <p>example part ot the playbook:</p>
  
  <pre><code>- name: lineinfile loop
    lineinfile:
      path: /myfile
      regexp '^{{somethinglike item.0}}.(?!{{something like item.1}})'
      state absent
      ...
  </code></pre>
  
  <p>Does anybody know a solution for the lookup and the loop?</p>
  
  <p>Best regards</p>