### Summary

When I define `failed_when:` condition in the task using `add_host`, it caused an error that the variable was not found.


### Issue Type

Bug Report

### Component Name

task

### Ansible Version

```console
$ ansible --version
ansible [core 2.11.2] 
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/var/lib/awx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.8/site-packages/ansible
  ansible collection location = /var/lib/awx/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.8.6 (default, Jan 22 2021, 11:41:28) [GCC 8.4.1 20200928 (Red Hat 8.4.1-1)]
  jinja version = 2.10.3
  libyaml = True
```


### Configuration

```console
$ ansible-config dump --only-changed
$

(nothing)
```


### OS / Environment

$ cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.4 (Ootpa)


### Steps to Reproduce

### pattern 1:  using `add_host` module 

```
---
- hosts: localhost
  gather_facts: false
  vars:
    test: 1
  tasks:
     - add_host:
         name: "myhost"
         groups: "mygroup"
         ansible_host: "host46"
         ansible_ssh_host: "192.168.100.100"
       failed_when: test == 2
```

When I ran the above playbook, it failed with error as below even the variable 'test' was defined in the play.

```
$ ansible-playbook -i localhost, conditional.yml 

PLAY [localhost] *********************************************************************************************************************************************************************************

TASK [add_host] **********************************************************************************************************************************************************************************
ERROR! The conditional check 'test == 2' failed. The error was: error while evaluating conditional (test == 2): 'test' is undefined
```

If I passed the variable as an extra_vars and specified to be true, it worked as expected.

```
$ ansible-playbook -i localhost, conditional.yml -e "{test: 2}"

PLAY [localhost] *********************************************************************************************************************************************************************************

TASK [add_host] **********************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"add_host": {"groups": ["mygroup"], "host_name": "myhost", "host_vars": {"ansible_host": "host46", "ansible_ssh_host": "192.168.100.100"}}, "changed": false, "failed_when_result": true}

NO MORE HOSTS LEFT *******************************************************************************************************************************************************************************

PLAY RECAP ***************************************************************************************************************************************************************************************
localhost                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   
```

On the other hand when "{test: 1}", it failed.

```
$ ansible-playbook -i localhost, conditional.yml -e "{test: 1}"

PLAY [localhost] *********************************************************************************************************************************************************************************

TASK [add_host] **********************************************************************************************************************************************************************************
ERROR! The conditional check 'test == 2' failed. The error was: error while evaluating conditional (test == 2): 'test' is undefined
```

### pattern 2: using `debug` module, it worked as desired

```
---
- hosts: localhost
  gather_facts: false
  vars:
    test: 1
  tasks:
     - debug:
         msg: "debug message"
       failed_when: test == 2
```

It works.

```
$ ansible-playbook -i localhost, debug.yml 

PLAY [localhost] *********************************************************************************************************************************************************************************

TASK [debug] *************************************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": "debug message"
}

PLAY RECAP ***************************************************************************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
```

When passed `2`, it failed as expected.

```
$ ansible-playbook -i localhost, debug.yml -e "{test: 2}"

PLAY [localhost] *********************************************************************************************************************************************************************************

TASK [debug] *************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {
    "msg": "debug message"
}

PLAY RECAP ***************************************************************************************************************************************************************************************
localhost                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   
```




### Expected Results

The `pattern 1` should work as the `pattern 2` from the point of view of handling the conditional.


### Actual Results

```console
(already pasted above)
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
'''
    This is the main worker class for the executor pipeline, which
    handles loading an action plugin to actually dispatch the task to
    a given host. This class roughly corresponds to the old Runner()
    class.
    '''
    def __init__(self, host, task, job_vars, play_context, new_stdin, loader, shared_loader_obj, final_q):
        self._host = host
        self._task = task
        self._job_vars = job_vars
        self._play_context = play_context
        self._new_stdin = new_stdin
        self._loader = loader
        self._shared_loader_obj = shared_loader_obj
        self._connection = None
        self._final_q = final_q
        self._loop_eval_error = None
        self._task.squash()
    def run(self):