<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->

##### SUMMARY
<!--- Explain the problem briefly below -->
When running a task var is defined in shell task, undefined in notify

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
notify, loop, var, include_role
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```
  ansible 2.8.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/usr/share/ansible_modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /bin/ansible
  python version = 2.7.5 (default, Mar 26 2019, 22:13:06) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] 

```

##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```
ALLOW_WORLD_READABLE_TMPFILES(/etc/ansible/ansible.cfg) = True
ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True
ANSIBLE_SSH_ARGS(/etc/ansible/ansible.cfg) = -o ControlMaster=auto -o ControlPersist=240s
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 100
DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /var/log/ansible.log
DEFAULT_MODULE_PATH(/etc/ansible/ansible.cfg) = [u'/usr/share/ansible_modules']
DEFAULT_ROLES_PATH(/etc/ansible/ansible.cfg) = [u'/etc/ansible/roles', u'/var/lib/awx/projects/_394__ansiblerepo/roles', u'/var/lib/awx/projects/_414__t02058_ivr_billing/roles']
DEFAULT_SCP_IF_SSH(/etc/ansible/ansible.cfg) = True
DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 600
INVALID_TASK_ATTRIBUTE_FAILED(/etc/ansible/ansible.cfg) = False
RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = False 
 


```

##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
Red Hat Enterprise Linux Server release 7.6 (Maipo) 

##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->

<!--- Paste example playbooks or commands between quotes below -->
```
  ##Playbook
 - hosts: mygroup
   tasks: 
   - debug:
       msg: Starting all Apps
       
   - name: Load apps Variables
     include_vars: AppsList.yml
     tags:
      - start
      - bounce
    
   - include_role: 
       name: "{{ web.appname }}"
       apply: 
         ignore_errors: yes
     vars: 
       appname: "{{ web.appname }}"
     loop: "{{ apps }}"
     loop_control: 
       loop_var: web
     when: apps is defined
     ignore_errors: yes
     tags:
      - start
      - bounce
      
## AppsList.yml
apps:
 - { appname: App1} 
 - { appname: App2 }
 
##Role included in loop
 - name: get pid
   shell: "ps -ef | grep -w {{ appname }} "
   register: ServicePid
   tags:
     - start
     ##Task is fine
   
 - name: Register Bounce variable
   debug:
     msg: This task paired with the next triggers a bounce with bounce tag, but skips the bounce without it, preserving idempotency
     verbosity: 5
   register: Bounce     
   ignore_errors: "{{ ansible_check_mode }}"
   tags: 
    - start
   
 - name: Notify start -  if nothing changed or we want to bounce and still not running
   debug:
    msg: Not Running - Starting App
   changed_when: true 
   notify: "restart {{ appname }}"
   when: Bounce is not defined or ServicePid.stdout == "" 
   tags: 
     - bounce
     - start
  ##task fails - ERROR! 'appname' is undefined

```

<!--- HINT: You can paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
I expect that 'appname' will be defined inside the loop for all tasks. 
 this worked in Ansible 2.7 


##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->

<!--- Paste verbatim command output between quotes -->
```ok: [host] => {
    "changed": false, 
    "cmd": "ps -ef | grep -w App1|
    "delta": "0:00:00.115077", 
    "end": "2019-07-08 16:34:32.173968", 
    "invocation": {
        "module_args": {
            "_raw_params": "ps -ef | grep -w App1
            "_uses_shell": true, 
            "argv": null, 
            "chdir": null, 
            "creates": null, 
            "executable": null, 
            "removes": null, 
            "stdin": null, 
            "stdin_add_newline": true, 
            "strip_empty_ends": true, 
            "warn": true
        }
    }, 
    "rc": 0, 
    "start": "2019-…
TASK [webservice/SoapServiceStatus : Register Bounce variable] *****************
task path: /var/lib/awx/projects/_394__ansiblerepo/playbooks/roles/webservice/SoapServiceStatus/tasks/main.yml:10
ok: [host




] => {
    "msg": "This task paired with the next triggers a bounce with bounce tag, but skips the bounce without it, preserving idempotency"
}
TASK [webservice/SoapServiceStatus : Notify start -  if nothing changed or we want to bounce and still not running] ***
task path: /var/lib/awx/projects/_394__ansiblerepo/playbooks/roles/webservice/SoapServiceStatus/tasks/main.yml:19
ERROR! 'appname' is undefined

```
[Role.txt](https://github.com/ansible/ansible/files/3370349/Role.txt)
[AppsList.txt](https://github.com/ansible/ansible/files/3370350/AppsList.txt)
[play.txt](https://github.com/ansible/ansible/files/3370351/play.txt)
while True:
        try:
            result = strategy._final_q.get()
            if isinstance(result, StrategySentinel):
                break
            elif isinstance(result, CallbackSend):
                for arg in result.args:
                    if isinstance(arg, TaskResult):
                        strategy.normalize_task_result(arg)
                        break
                strategy._tqm.send_callback(result.method_name, *result.args, **result.kwargs)
            elif isinstance(result, TaskResult):
                strategy.normalize_task_result(result)
                with strategy._results_lock:
                    
                    
                    
                    if 'listen' in result._task_fields:
                        strategy._handler_results.append(result)
                    else:
                        strategy._results.append(result)
            else:
                display.warning('Received an invalid object (%s) in the result queue: %r' % (type(result), result))
        except (IOError, EOFError):
            break
        except Queue.Empty:
            pass
def debug_closure(func):