title: Ansible error: The task includes an option with an undefined variable
body: <p>Below is how my complete helpA.yml playbook looks like:</p>
  
  <pre><code>- hosts: localhost
  
    tasks:
     - name: "Construct File Path {{ inventory_hostname }} before Deployment."
       tags: validate
       include_vars:
         file: "{{ item }}"
       with_fileglob:
          - "vars/{{ Layer }}_*.yaml"
  
     - name: "set_fact"
       tags: validate
       set_fact:
         fpath_APP: "{{ fpath_APP + [ BASEPATH ~ '/' ~ vars[item.split('.')[1]] ~ '/' ~ item | basename ] }}"
       when: Layer == 'APP'
       with_items:
         - "{{ Source_Filenames.split(',') }}"
       vars:
         fpath_APP: []
  
     - debug: var=fpath_{{ Layer }}
  </code></pre>
  
  <p>I'm getting the below syntax error running the yml.</p>
  
  <blockquote>
    <p>$ ansible-playbook /app/helpA.yml --tags  validate -e
    "Source_Filenames=/tmp/logs/filename1.src,/tmp/logs/33211.sql,/app/Jenkins/file1.mrt
    Layer=APP"  [WARNING]: provided hosts list is empty, only localhost is
    available. Note that the implicit localhost does not match 'all'</p>
    
    <p>PLAY [localhost]</p>
    
    <hr>
    
    <p>TASK [Construct File Path localhost before Deployment.]
    ************************************************************************************************* ok: [localhost] => (item=/app/vars/APP_BASE_vars.yaml)</p>
    
    <p>TASK [set_fact]
    *************************************************************************************************************************************************************** fatal: [localhost]: FAILED! => {"msg": "The task includes an option
    with an undefined variable. The error was: 'dict object' has no
    attribute u'src'\n\nThe error appears to be in '/app/helpA.yml': line
    12, column 6, but may\nbe elsewhere in the file depending on the exact
    syntax problem.\n\nThe offending line appears to be:\n\n\n   - name:
    \"set_fact\"\n     ^ here\n"}</p>
    
    <p>PLAY RECAP
    ******************************************************************************************************************************************************************** localhost                  : ok=1    changed=0    unreachable=0<br>
    failed=1    skipped=0    rescued=0    ignored=0</p>
  </blockquote>
  
  <p>I'm on the latest version on of ansible and python 2.7.5</p>