### Summary

lookup first_found fails when path is configured and contains spaces.
Wasn't the issue with 2.9, started to occur with 2.12.



### Issue Type

Bug Report

### Component Name

first_found

### Ansible Version

```console
$ ansible --version

ansible [core 2.12.1]
  config file = None
  configured module search path = ['/Users/afunix/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/5.0.1/libexec/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/afunix/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.1 (main, Dec  6 2021, 22:25:40) [Clang 13.0.0 (clang-1300.0.29.3)]
  jinja version = 3.0.3
  libyaml = True
```


### Configuration

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


### OS / Environment

MacOS 12.1
Ubuntu 20.04

### Steps to Reproduce

hosts
```yaml
localhost ansible_connection=local
```

playbook.yml
```yaml
---
- hosts: all
  roles:
    - test
```

roles/test/tasks/main.yml
```yaml
---
- include_vars: "{{lookup('first_found', params)}}"
  vars:
    params:
      files:
        - "test_vars.yml"
      paths:
        - "{{role_path}}/vars"
```

roles/test/vars/test_vars.yml
```yaml
---
```


### Expected Results

ansible-playbook executes successfully

### Actual Results

```console
afunix@blake ~/tmp/bug $ pwd
/Users/afunix/tmp/bug
afunix@blake ~/tmp/bug $ ansible-playbook -Di hosts playbook.yml            

PLAY [all] *********************************************************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] *********************************************************************************************************************************************************************************************************************************************************
[WARNING]: Platform darwin on host localhost is using the discovered Python interpreter at /usr/local/bin/python3.9, but future installation of another Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible-
core/2.12/reference_appendices/interpreter_discovery.html for more information.
ok: [localhost]

TASK [test : include_vars] *****************************************************************************************************************************************************************************************************************************************************
ok: [localhost]

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



afunix@blake ~/tmp/bug with spaces $ pwd
/Users/afunix/tmp/bug with spaces
afunix@blake ~/tmp/bug with spaces $ ansible-playbook -Di hosts playbook.yml

PLAY [all] *********************************************************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] *********************************************************************************************************************************************************************************************************************************************************
[WARNING]: Platform darwin on host localhost is using the discovered Python interpreter at /usr/local/bin/python3.9, but future installation of another Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible-
core/2.12/reference_appendices/interpreter_discovery.html for more information.
ok: [localhost]

TASK [test : include_vars] *****************************************************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "No file was found when using first_found."}

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



afunix@blake ~/tmp/bug with spaces $ ansible-playbook -Di hosts playbook.yml -vvvvv
ansible-playbook [core 2.12.1]
  config file = None
  configured module search path = ['/Users/afunix/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/5.0.1/libexec/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/afunix/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible-playbook
  python version = 3.10.1 (main, Dec  6 2021, 22:25:40) [Clang 13.0.0 (clang-1300.0.29.3)]
  jinja version = 3.0.3
  libyaml = True
No config file found; using defaults
Reading vault password file: /Users/afunix/.vault
setting up inventory plugins
host_list declined parsing /Users/afunix/tmp/bug with spaces/hosts as it did not pass its verify_file() method
script declined parsing /Users/afunix/tmp/bug with spaces/hosts as it did not pass its verify_file() method
auto declined parsing /Users/afunix/tmp/bug with spaces/hosts as it did not pass its verify_file() method
Set default localhost to localhost
Parsed /Users/afunix/tmp/bug with spaces/hosts inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /usr/local/Cellar/ansible/5.0.1/libexec/lib/python3.10/site-packages/ansible/plugins/callback/default.py
Attempting to use 'default' callback.
Skipping callback 'default', as we already have a stdout callback.
Attempting to use 'junit' callback.
Attempting to use 'minimal' callback.
Skipping callback 'minimal', as we already have a stdout callback.
Attempting to use 'oneline' callback.
Skipping callback 'oneline', as we already have a stdout callback.
Attempting to use 'tree' callback.

PLAYBOOK: playbook.yml *********************************************************************************************************************************************************************************************************************************************************
Positional arguments: playbook.yml
verbosity: 5
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
diff: True
inventory: ('/Users/afunix/tmp/bug with spaces/hosts',)
forks: 5
1 plays in playbook.yml

PLAY [all] *********************************************************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] *********************************************************************************************************************************************************************************************************************************************************
task path: /Users/afunix/tmp/bug with spaces/playbook.yml:2
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: afunix
<localhost> EXEC /bin/sh -c 'echo ~afunix && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /Users/afunix/.ansible/tmp `"&& mkdir "` echo /Users/afunix/.ansible/tmp/ansible-tmp-1641344178.921433-70880-92695461947872 `" && echo ansible-tmp-1641344178.921433-70880-92695461947872="` echo /Users/afunix/.ansible/tmp/ansible-tmp-1641344178.921433-70880-92695461947872 `" ) && sleep 0'
Including module_utils file ansible/__init__.py
Including module_utils file ansible/module_utils/__init__.py
Including module_utils file ansible/module_utils/_text.py
Including module_utils file ansible/module_utils/basic.py
Including module_utils file ansible/module_utils/common/_collections_compat.py
Including module_utils file ansible/module_utils/common/__init__.py
Including module_utils file ansible/module_utils/common/_json_compat.py
Including module_utils file ansible/module_utils/common/_utils.py
Including module_utils file ansible/module_utils/common/arg_spec.py
Including module_utils file ansible/module_utils/common/file.py
Including module_utils file ansible/module_utils/common/locale.py
Including module_utils file ansible/module_utils/common/parameters.py
Including module_utils file ansible/module_utils/common/collections.py
Including module_utils file ansible/module_utils/common/process.py
Including module_utils file ansible/module_utils/common/sys_info.py
Including module_utils file ansible/module_utils/common/text/converters.py
Including module_utils file ansible/module_utils/common/text/__init__.py
Including module_utils file ansible/module_utils/common/text/formatters.py
Including module_utils file ansible/module_utils/common/validation.py
Including module_utils file ansible/module_utils/common/warnings.py
Including module_utils file ansible/module_utils/compat/selectors.py
Including module_utils file ansible/module_utils/compat/__init__.py
Including module_utils file ansible/module_utils/compat/_selectors2.py
Including module_utils file ansible/module_utils/compat/selinux.py
Including module_utils file ansible/module_utils/distro/__init__.py
Including module_utils file ansible/module_utils/distro/_distro.py
Including module_utils file ansible/module_utils/errors.py
Including module_utils file ansible/module_utils/facts/ansible_collector.py
Including module_utils file ansible/module_utils/facts/__init__.py
Including module_utils file ansible/module_utils/facts/collector.py
Including module_utils file ansible/module_utils/facts/compat.py
Including module_utils file ansible/module_utils/facts/default_collectors.py
Including module_utils file ansible/module_utils/facts/hardware/aix.py
Including module_utils file ansible/module_utils/facts/hardware/__init__.py
Including module_utils file ansible/module_utils/facts/hardware/base.py
Including module_utils file ansible/module_utils/facts/hardware/darwin.py
Including module_utils file ansible/module_utils/facts/hardware/dragonfly.py
Including module_utils file ansible/module_utils/facts/hardware/freebsd.py
Including module_utils file ansible/module_utils/facts/hardware/hpux.py
Including module_utils file ansible/module_utils/facts/hardware/hurd.py
Including module_utils file ansible/module_utils/facts/hardware/linux.py
Including module_utils file ansible/module_utils/facts/hardware/netbsd.py
Including module_utils file ansible/module_utils/facts/hardware/openbsd.py
Including module_utils file ansible/module_utils/facts/hardware/sunos.py
Including module_utils file ansible/module_utils/facts/namespace.py
Including module_utils file ansible/module_utils/facts/network/aix.py
Including module_utils file ansible/module_utils/facts/network/__init__.py
Including module_utils file ansible/module_utils/facts/network/base.py
Including module_utils file ansible/module_utils/facts/network/darwin.py
Including module_utils file ansible/module_utils/facts/network/dragonfly.py
Including module_utils file ansible/module_utils/facts/network/fc_wwn.py
Including module_utils file ansible/module_utils/facts/network/freebsd.py
Including module_utils file ansible/module_utils/facts/network/generic_bsd.py
Including module_utils file ansible/module_utils/facts/network/hpux.py
Including module_utils file ansible/module_utils/facts/network/hurd.py
Including module_utils file ansible/module_utils/facts/network/iscsi.py
Including module_utils file ansible/module_utils/facts/network/linux.py
Including module_utils file ansible/module_utils/facts/network/netbsd.py
Including module_utils file ansible/module_utils/facts/network/nvme.py
Including module_utils file ansible/module_utils/facts/network/openbsd.py
Including module_utils file ansible/module_utils/facts/network/sunos.py
Including module_utils file ansible/module_utils/facts/other/facter.py
Including module_utils file ansible/module_utils/facts/other/__init__.py
Including module_utils file ansible/module_utils/facts/other/ohai.py
Including module_utils file ansible/module_utils/facts/sysctl.py
Including module_utils file ansible/module_utils/facts/system/apparmor.py
Including module_utils file ansible/module_utils/facts/system/__init__.py
Including module_utils file ansible/module_utils/facts/system/caps.py
Including module_utils file ansible/module_utils/facts/system/chroot.py
Including module_utils file ansible/module_utils/facts/system/cmdline.py
Including module_utils file ansible/module_utils/facts/system/date_time.py
Including module_utils file ansible/module_utils/facts/system/distribution.py
Including module_utils file ansible/module_utils/facts/system/dns.py
Including module_utils file ansible/module_utils/facts/system/env.py
Including module_utils file ansible/module_utils/facts/system/fips.py
Including module_utils file ansible/module_utils/facts/system/local.py
Including module_utils file ansible/module_utils/facts/system/lsb.py
Including module_utils file ansible/module_utils/facts/system/pkg_mgr.py
Including module_utils file ansible/module_utils/facts/system/platform.py
Including module_utils file ansible/module_utils/facts/system/python.py
Including module_utils file ansible/module_utils/facts/system/selinux.py
Including module_utils file ansible/module_utils/facts/system/service_mgr.py
Including module_utils file ansible/module_utils/compat/version.py
Including module_utils file ansible/module_utils/facts/system/ssh_pub_keys.py
Including module_utils file ansible/module_utils/facts/system/user.py
Including module_utils file ansible/module_utils/facts/timeout.py
Including module_utils file ansible/module_utils/facts/utils.py
Including module_utils file ansible/module_utils/facts/virtual/base.py
Including module_utils file ansible/module_utils/facts/virtual/__init__.py
Including module_utils file ansible/module_utils/facts/virtual/dragonfly.py
Including module_utils file ansible/module_utils/facts/virtual/freebsd.py
Including module_utils file ansible/module_utils/facts/virtual/hpux.py
Including module_utils file ansible/module_utils/facts/virtual/linux.py
Including module_utils file ansible/module_utils/facts/virtual/netbsd.py
Including module_utils file ansible/module_utils/facts/virtual/openbsd.py
Including module_utils file ansible/module_utils/facts/virtual/sunos.py
Including module_utils file ansible/module_utils/facts/virtual/sysctl.py
Including module_utils file ansible/module_utils/parsing/convert_bool.py
Including module_utils file ansible/module_utils/parsing/__init__.py
Including module_utils file ansible/module_utils/pycompat24.py
Including module_utils file ansible/module_utils/six/__init__.py
<localhost> Attempting python interpreter discovery
<localhost> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command -v '"'"'python3.10'"'"'; command -v '"'"'python3.9'"'"'; command -v '"'"'python3.8'"'"'; command -v '"'"'python3.7'"'"'; command -v '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v '"'"'/usr/bin/python3'"'"'; command -v '"'"'/usr/libexec/platform-python'"'"'; command -v '"'"'python2.7'"'"'; command -v '"'"'python2.6'"'"'; command -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && sleep 0'
<localhost> Python interpreter discovery fallback (unsupported platform for extended discovery: darwin)
Using module file /usr/local/Cellar/ansible/5.0.1/libexec/lib/python3.10/site-packages/ansible/modules/setup.py
<localhost> PUT /Users/afunix/.ansible/tmp/ansible-local-70877y8t3c9b_/tmp3he6rmv3 TO /Users/afunix/.ansible/tmp/ansible-tmp-1641344178.921433-70880-92695461947872/AnsiballZ_setup.py
<localhost> EXEC /bin/sh -c 'chmod u+x /Users/afunix/.ansible/tmp/ansible-tmp-1641344178.921433-70880-92695461947872/ /Users/afunix/.ansible/tmp/ansible-tmp-1641344178.921433-70880-92695461947872/AnsiballZ_setup.py && sleep 0'
<localhost> EXEC /bin/sh -c '/usr/local/bin/python3.9 /Users/afunix/.ansible/tmp/ansible-tmp-1641344178.921433-70880-92695461947872/AnsiballZ_setup.py && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /Users/afunix/.ansible/tmp/ansible-tmp-1641344178.921433-70880-92695461947872/ > /dev/null 2>&1 && sleep 0'
[WARNING]: Platform darwin on host localhost is using the discovered Python interpreter at /usr/local/bin/python3.9, but future installation of another Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible-
core/2.12/reference_appendices/interpreter_discovery.html for more information.
ok: [localhost]
META: ran handlers

TASK [test : include_vars] *****************************************************************************************************************************************************************************************************************************************************
task path: /Users/afunix/tmp/bug with spaces/roles/test/tasks/main.yml:2
looking for "with/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/roles/test/files/with/test_vars.yml"
looking for "with/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/roles/test/with/test_vars.yml"
looking for "with/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/roles/test/tasks/files/with/test_vars.yml"
looking for "with/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/roles/test/tasks/with/test_vars.yml"
looking for "with/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/files/with/test_vars.yml"
looking for "with/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/with/test_vars.yml"
looking for "with/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/files/with/test_vars.yml"
looking for "with/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/with/test_vars.yml"
looking for "spaces/roles/test/vars/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/roles/test/files/spaces/roles/test/vars/test_vars.yml"
looking for "spaces/roles/test/vars/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/roles/test/spaces/roles/test/vars/test_vars.yml"
looking for "spaces/roles/test/vars/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/roles/test/tasks/files/spaces/roles/test/vars/test_vars.yml"
looking for "spaces/roles/test/vars/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/roles/test/tasks/spaces/roles/test/vars/test_vars.yml"
looking for "spaces/roles/test/vars/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/files/spaces/roles/test/vars/test_vars.yml"
looking for "spaces/roles/test/vars/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/spaces/roles/test/vars/test_vars.yml"
looking for "spaces/roles/test/vars/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/files/spaces/roles/test/vars/test_vars.yml"
looking for "spaces/roles/test/vars/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/spaces/roles/test/vars/test_vars.yml"
fatal: [localhost]: FAILED! => {
    "msg": "No file was found when using first_found."
}

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


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
- name: Set _found_file to the first existing file, or an empty list if no files found
  ansible.builtin.set_fact:
    _found_file: "{{ lookup('ansible.builtin.first_found', files, paths=['/extra/path'], skip=True) }}"
  vars:
    files:
      - /path/to/foo.txt
      - /path/to/bar.txt
- name: Include tasks only if one of the files exist, otherwise skip the task
  ansible.builtin.include_tasks:
    file: "{{ item }}"
  with_first_found:
    files:
     - path/tasks.yaml
     - path/other_tasks.yaml
    skip: True
- name: Include tasks only if one of the files exists, otherwise skip
  ansible.builtin.include_tasks: '{{ tasks_file }}'
  when: tasks_file != ""
  vars:
    tasks_file: "{{ lookup('ansible.builtin.first_found', files=['tasks.yaml', 'other_tasks.yaml'], errors='ignore') }}"
- name: |
        copy first existing file found to /some/file,
        looking in relative directories from where the task is defined and
        including any play objects that contain it
  ansible.builtin.copy:
    src: "{{ lookup('ansible.builtin.first_found', findme) }}"
    dest: /some/file
  vars:
    findme:
      - foo