### Summary

I am developing modules using the latest stable versions of Ansible on either Python 3.8 or 3.9. Both versions are giving errors. 

### Issue Type

Bug Report

### Component Name

ansible

### Ansible Version

```console
ansible [core 2.12.0]
  config file = /Users/kbreit/Documents/Programming/ansible_collections/cisco/meraki/ansible.cfg
  configured module search path = ['/Users/kbreit/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/kbreit/.pyenv/versions/3.9.7/envs/ansible-development-latest/lib/python3.9/site-packages/ansible
  ansible collection location = /Users/kbreit/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/kbreit/.pyenv/versions/ansible-development-latest/bin/ansible
  python version = 3.9.7 (default, Nov  7 2021, 06:44:13) [Clang 12.0.5 (clang-1205.0.22.9)]
  jinja version = 3.0.3
  libyaml = True
```


### Configuration

```console
DEFAULT_VAULT_PASSWORD_FILE(env: ANSIBLE_VAULT_PASSWORD_FILE) = /Users/kbreit/pass.txt
GALAXY_SERVER_LIST(/Users/kbreit/Documents/Programming/ansible_collections/cisco/meraki/ansible.cfg) = ['automation_hub']
```


### OS / Environment

macOS and Ubuntu 21.04

### Steps to Reproduce

Reproducing it largely depends on ansible-test. However...

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
(ansible-development-latest) meraki [master●●] % ansible-test network-integration --allow-unsupported --python 3.9 --docker default meraki_network
```


### Expected Results

I expect the `meraki_network` module (or whatever module I'm testing) to execute in full.

### Actual Results

```console
Starting new "ansible-test-controller-pVmIMX5s" container.
Adding "ansible-test-controller-pVmIMX5s" to container database.
NOTICE: Sourcing inventory file "tests/integration/inventory.networking" from "/Users/kbreit/Documents/Programming/ansible_collections/cisco/meraki/tests/integration/inventory.networking".
Traceback (most recent call last):
  File "/root/ansible/bin/ansible-test", line 42, in <module>
    main()
  File "/root/ansible/bin/ansible-test", line 33, in main
    cli_main()
  File "/root/ansible/test/lib/ansible_test/_internal/__init__.py", line 70, in main
    args.func(config)
  File "/root/ansible/test/lib/ansible_test/_internal/commands/integration/network.py", line 73, in command_network_integration
    command_integration_filtered(args, host_state, internal_targets, all_targets, inventory_path)
  File "/root/ansible/test/lib/ansible_test/_internal/commands/integration/__init__.py", line 458, in command_integration_filtered
    create_inventory(args, host_state, inventory_path, target)
  File "/root/ansible/test/lib/ansible_test/_internal/commands/integration/__init__.py", line 382, in create_inventory
    create_network_inventory(args, inventory_path, target_profiles)
  File "/root/ansible/test/lib/ansible_test/_internal/inventory.py", line 90, in create_network_inventory
    shutil.copyfile(first.config.path, path)
  File "/usr/lib/python3.9/shutil.py", line 243, in copyfile
    if _samefile(src, dst):
  File "/usr/lib/python3.9/shutil.py", line 220, in _samefile
    return os.path.samefile(src, dst)
  File "/usr/lib/python3.9/genericpath.py", line 100, in samefile
    s1 = os.stat(f1)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
ERROR: Command "docker exec -it ansible-test-controller-pVmIMX5s /usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=/root/ansible_collections/cisco/meraki LC_ALL=en_US.UTF-8 /usr/bin/python3.9 /root/ansible/bin/ansible-test network-integration --containers '{}' --allow-unsupported meraki_network --metadata tests/output/.tmp/metadata-os7__ecv.json --truncate 137 --color yes --host-path tests/output/.tmp/host-_fjd92yd" returned exit status 1.
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
return
    
    
    root_temp_dir = os.path.join(ResultType.TMP.path, 'integration')
    prefix = '%s-' % target.name
    suffix = u'-\u00c5\u00d1\u015a\u00cc\u03b2\u0141\u00c8'
    if args.no_temp_unicode or 'no/temp_unicode/' in target.aliases:
        display.warning('Disabling unicode in the temp work dir is a temporary debugging feature that may be removed in the future without notice.')
        suffix = '-ansible'
    if args.explain:
        temp_dir = os.path.join(root_temp_dir, '%stemp%s' % (prefix, suffix))
    else:
        make_dirs(root_temp_dir)
        temp_dir = tempfile.mkdtemp(prefix=prefix, suffix=suffix, dir=root_temp_dir)
    try:
        display.info('Preparing temporary directory: %s' % temp_dir, verbosity=2)
        inventory_relative_path = get_inventory_relative_path(args)
        inventory_path = os.path.join(temp_dir, inventory_relative_path)
        cache = IntegrationCache(args)
        target_dependencies = sorted([target] + list(cache.dependency_map.get(target.name, set())))
        files_needed = get_files_needed(target_dependencies)
        integration_dir = os.path.join(temp_dir, data_context().content.integration_path)
        targets_dir = os.path.join(temp_dir, data_context().content.integration_targets_path)
        ansible_config = os.path.join(temp_dir, ansible_config_relative)
        vars_file_src = os.path.join(data_context().content.root, data_context().content.integration_vars_path)
        vars_file = os.path.join(temp_dir, data_context().content.integration_vars_path)
        file_copies = [
            (ansible_config_src, ansible_config),
            (inventory_path_src, inventory_path),
        ]