### 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
del task_keys['retries']
        
        self._connection.set_options(task_keys=task_keys, var_options=options)
        varnames.extend(self._set_plugin_options('shell', variables, templar, task_keys))
        if self._connection.become is not None:
            if self._play_context.become_pass:
                
                
                
                
                task_keys['become_pass'] = self._play_context.become_pass
            varnames.extend(self._set_plugin_options('become', variables, templar, task_keys))
            
            for option in ('become_user', 'become_flags', 'become_exe', 'become_pass'):
                try:
                    setattr(self._play_context, option, self._connection.become.get_option(option))
                except KeyError:
                    pass  
            self._play_context.prompt = self._connection.become.prompt
        
        sub = getattr(self._connection, '_sub_plugin', None)
        if sub is not None and sub.get('type') != 'external':
            plugin_type = get_plugin_class(sub.get("obj"))
            varnames.extend(self._set_plugin_options(plugin_type, variables, templar, task_keys))
        sub_conn = getattr(self._connection, 'ssh_type_conn', None)
        if sub_conn is not None:
            varnames.extend(self._set_plugin_options("ssh_type_conn", variables, templar, task_keys))
        return varnames
    def _get_action_handler(self, templar):