title: Ansible with_first_found errors
body: <p>Ansible version: 2.9.6</p>
  
  <p>I'm running the below <code>include_vars</code> task:</p>
  
  <pre><code>- name: Testing first found
    include_vars: "{{ item }}"
    with_first_found:
      - files:
          - "vars/{{ myvar.split('-')[0] }}/{{ myvar.split('-')[1] }}.yml"
          - "vars/{{ myvar.split('-')[0] }}/{{ myvar.split('-')[1] }}-{{ myvar.split('-')[2] }}.yml"
        skip: true
  </code></pre>
  
  <p>Note that the value of <code>myvar</code> in this case is <code>hello-world</code>. The file vars/hello/world.yml exists, so there should be a match on the first item/file above.</p>
  
  <p>When I run this I get the error: <code>fatal: [localhost]: FAILED! =&gt; {"msg": "No file was found when using first_found. Use errors='ignore' to allow this task to be skipped if no files are found"}</code></p>
  
  <p>However, if I comment out the above task to look like this:</p>
  
  <pre><code>- name: Testing first found
    include_vars: "{{ item }}"
    with_first_found:
      - files:
          - "vars/{{ myvar.split('-')[0] }}/{{ myvar.split('-')[1] }}.yml"
          # - "vars/{{ myvar.split('-')[0] }}/{{ myvar.split('-')[1] }}-{{ myvar.split('-')[2] }}.yml"
        skip: true
  </code></pre>
  
  <p>Then the first file is found as expected and the vars are loaded.
  I know that the second item in my <code>with_first_found</code> will give an error, since I only have 2 elements in <code>myvar</code> and I can't do a split [2]. But Ansible shouldn't be trying to even evaluate the second line since that's the point of with first found.</p>
  
  <p>Just to test, I changed the split task a bit on the second line to use the element at 1 again:</p>
  
  <pre><code>- name: Testing first found
    include_vars: "{{ item }}"
    with_first_found:
      - files:
          - "vars/{{ myvar.split('-')[0] }}/{{ myvar.split('-')[1] }}.yml"
          - "vars/{{ myvar.split('-')[0] }}/{{ myvar.split('-')[1] }}-{{ myvar.split('-')[1] }}.yml"
        skip: true
  </code></pre>
  
  <p>This also passed</p>