### Summary

Running a play that does not specify `connection: ansible.netcommon.network_cli` against a host with `ansible_network_os` defined causes Ansible to try to use the local Ansible controller's python interpreter on the remote (causing a "file not found error").

It looks like this problem was introduced [here](https://github.com/ansible/ansible/commit/173d0a8de74f6124696282a6e40037f16c49efc2) and flagged for reversal [here](https://github.com/ansible/ansible/pull/74718) (though the reversion was never merged).

### Issue Type

Bug Report

### Component Name

interpreter discovery

### Ansible Version

```console
$ ansible --version
ansible [core 2.12.1]
  config file = ansible.cfg
  configured module search path = ['.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = .venv/lib/python3.10/site-packages/ansible
  ansible collection location = .ansible
  executable location = .venv/bin/ansible
  python version = 3.10.1 (main, Dec  9 2021, 00:00:00) [GCC 11.2.1 20211203 (Red Hat 11.2.1-7)]
  jinja version = 2.11.3
  libyaml = True
```


### Configuration

```console
$ ansible-config dump --only-changed
COLLECTIONS_PATHS(env: ANSIBLE_COLLECTIONS_PATH) = ['.ansible']
HOST_KEY_CHECKING(ansible.cfg) = False
INVENTORY_ENABLED(ansible.cfg) = ['ansible.builtin.script', 'ansible.builtin.yaml']
```


### OS / Environment

Ansible Controller OS: Fedora 35
Python version: 3.10.1

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml
# playbook.yml
---
- hosts: all
  gather_facts: true

# inventory.yml
---
all:
  hosts:
    any-host-of-any-type.mydomain.local: {}
```

Run command:
```
# note that "edgeos" is just any arbitrary value supported by the network os setting
ansible-playbook playbook.yml -i inventory.yml -e ansible_network_os=edgeos
```

### Expected Results

I expected the `ansible_network_os` setting to be ignored since the play in `playbook.yml` does not specify the `connection: ansible.netcommon.network_cli` setting.

### Actual Results

```console
fatal: [any-host-of-any-type.mydomain.local]: FAILED! => {
    "ansible_facts": {},
    "changed": false,
    "failed_modules": {
        "ansible.legacy.setup": {
            "failed": true,
            "module_stderr": "Shared connection to any-host-of-any-type.mydomain.local closed.\r\n",
            "module_stdout": "/bin/sh: .venv/bin/python: No such file or directory\r\n",
            "msg": "The module failed to execute correctly, you probably need to set the interpreter.\nSee stdout/stderr for the exact error",
            "rc": 127
        }
    },
    "msg": "The following modules failed to execute: ansible.legacy.setup\n"
}
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
results = []
        for item_index, item in enumerate(items):
            task_vars['ansible_loop_var'] = loop_var
            task_vars[loop_var] = item
            if index_var:
                task_vars['ansible_index_var'] = index_var
                task_vars[index_var] = item_index
            if extended:
                task_vars['ansible_loop'] = {
                    'index': item_index + 1,
                    'index0': item_index,
                    'first': item_index == 0,
                    'last': item_index + 1 == items_len,
                    'length': items_len,
                    'revindex': items_len - item_index,
                    'revindex0': items_len - item_index - 1,
                }
                if extended_allitems:
                    task_vars['ansible_loop']['allitems'] = items
                try:
                    task_vars['ansible_loop']['nextitem'] = items[item_index + 1]
                except IndexError:
                    pass
                if item_index - 1 >= 0:
                    task_vars['ansible_loop']['previtem'] = items[item_index - 1]
            
            templar.available_variables = task_vars
            
            if loop_pause and ran_once:
                time.sleep(loop_pause)