title: Ansible single-element list breaks lookup call
body: <p>I want to lookup-replace multiple lines, with a loop, in the <code>known_hosts</code> file for further SSH use. So I'm checking the file with this task:</p>
  
  <pre><code>- name: Checking "known_hosts"
    loop: "{{ groups['nodes'] }}"
    lineinfile:
      dest: ~/.ssh/known_hosts
      state: present
      line: "{{ lookup('pipe', 'ssh-keyscan -trsa -p 22 ' + item) }}"
      create: yes
  </code></pre>
  
  <p>This produces an error:</p>
  
  <blockquote>
    <p>Invalid data passed to 'loop', it requires a list, got this instead: [u'node.env1']'. Hint: If you passed a list/dict of just one element, try adding wantlist=True to your lookup invocation or use q/query instead of lookup.</p>
  </blockquote>
  
  <p>It happens to be a list of one element. Well, okay, let's edit ~</p>
  
  <pre><code>line: "{{ q('pipe', 'ssh-keyscan -trsa -p 22 ' + item) }}"
  </code></pre>
  
  <blockquote>
    <p>Invalid data passed to 'loop', it requires a list, got this instead: [u'node.env1']'. Hint: If you passed a list/dict of just one element, try adding wantlist=True to your lookup invocation or use q/query instead of lookup.</p>
  </blockquote>
  
  <p>Thanks for the hint, Ansible-sama.</p>
  
  <p>(Just in case, same behavior with <code>query</code>, or with <code>wantList=True</code>.)</p>
  
  <p>What is happening here?</p>