### 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
coverage_manager.setup()
    try:
        for target in targets_iter:
            if args.start_at and not found:
                found = target.name == args.start_at
                if not found:
                    continue
            create_inventory(args, host_state, inventory_path, target)
            tries = 2 if args.retry_on_error else 1
            verbosity = args.verbosity
            cloud_environment = get_cloud_environment(args, target)
            try:
                while tries:
                    tries -= 1
                    try:
                        if cloud_environment:
                            cloud_environment.setup_once()
                        run_setup_targets(args, host_state, test_dir, target.setup_once, all_targets_dict, setup_targets_executed, inventory_path,
                                          coverage_manager, False)
                        start_time = time.time()
                        if pre_target:
                            pre_target(target)
                        run_setup_targets(args, host_state, test_dir, target.setup_always, all_targets_dict, setup_targets_executed, inventory_path,
                                          coverage_manager, True)
                        if not args.explain:
                            
                            remove_tree(test_dir)
                            make_dirs(test_dir)
                        try:
                            if target.script_path: