### 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
if setup_errors:
        raise ApplicationError('Found %d invalid setup aliases:\n%s' % (len(setup_errors), '\n'.join(setup_errors)))
    check_pyyaml(host_state.controller_profile.python)
    test_dir = os.path.join(ResultType.TMP.path, 'output_dir')
    if not args.explain and any('needs/ssh/' in target.aliases for target in targets):
        max_tries = 20
        display.info('SSH connection to controller required by tests. Checking the connection.')
        for i in range(1, max_tries + 1):
            try:
                run_command(args, ['ssh', '-o', 'BatchMode=yes', 'localhost', 'id'], capture=True)
                display.info('SSH service responded.')
                break
            except SubprocessError:
                if i == max_tries:
                    raise
                seconds = 3
                display.warning('SSH service not responding. Waiting %d second(s) before checking again.' % seconds)
                time.sleep(seconds)
    start_at_task = args.start_at_task
    results = {}
    target_profile = host_state.target_profiles[0]
    if isinstance(target_profile, PosixProfile):
        target_python = target_profile.python
        if isinstance(target_profile, ControllerProfile):
            if host_state.controller_profile.python.path != target_profile.python.path:
                install_requirements(args, target_python, command=True, controller=False)  
        elif isinstance(target_profile, SshTargetHostProfile):
            connection = target_profile.get_controller_target_connections()[0]
            install_requirements(args, target_python, command=True, controller=False, connection=connection)  
    coverage_manager = CoverageManager(args, host_state, inventory_path)