### Summary

Variables in inventory after version 2.13. x can not be replaced with actual values when execute task,  because of this MR: https://github.com/ansible/ansible/pull/76590

config：
primaryIp: 'aa.aa.aa.aa'
standbyIp: 'bb.bb.bb.bb'
user_name: xx

inventory:
[xx]
primary ansible_ssh_user={{user_name}} ansible_ssh_host={{primaryIp}}
standby ansible_ssh_user={{user_name}} ansible_ssh_host={{standbyIp}}

expected result:
![image](https://user-images.githubusercontent.com/14883035/210030411-9148fd27-d707-4291-a58b-3b3348b6b039.png)
Actual Results:
![image](https://user-images.githubusercontent.com/14883035/210030708-6be462ba-4b6f-4d69-8b7e-84e9de482675.png)


### Issue Type

Bug Report

### Component Name

lib/ansible/executor/task_executor.py

### Ansible Version

```console
$ ansible --version
ansible [core 2.13.6]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/xxx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/ansible/lib64/python3.9/site-packages/ansible
  ansible collection location = /home/xxx/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/ansible/bin/ansible
  python version = 3.9.9 (main, Sep 21 2022, 09:00:34) [GCC 10.3.1]
  jinja version = 3.0.3
  libyaml = True
```


### Configuration

```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
CACHE_PLUGIN(/etc/ansible/ansible.cfg) = memory
COMMAND_WARNINGS(/etc/ansible/ansible.cfg) = False
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 20
DEFAULT_GATHERING(/etc/ansible/ansible.cfg) = smart
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/etc/ansible/hosts']
DEFAULT_MANAGED_STR(/etc/ansible/ansible.cfg) = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
DEFAULT_NO_TARGET_SYSLOG(/etc/ansible/ansible.cfg) = True
DEFAULT_POLL_INTERVAL(/etc/ansible/ansible.cfg) = 15
DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 60
DEFAULT_TRANSPORT(/etc/ansible/ansible.cfg) = paramiko
DEPRECATION_WARNINGS(/etc/ansible/ansible.cfg) = False
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = auto_legacy_silent
PARAMIKO_HOST_KEY_AUTO_ADD(/etc/ansible/ansible.cfg) = True
PARAMIKO_LOOK_FOR_KEYS(/etc/ansible/ansible.cfg) = False
RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = True
SYSTEM_WARNINGS(/etc/ansible/ansible.cfg) = False

CONNECTION:
==========

paramiko_ssh:
____________
host_key_auto_add(/etc/ansible/ansible.cfg) = True
host_key_checking(/etc/ansible/ansible.cfg) = False
look_for_keys(/etc/ansible/ansible.cfg) = False
ssh_args(/etc/ansible/ansible.cfg) = -C -o ControlMaster=auto -o ControlPersist=1800s

ssh:
___
host_key_checking(/etc/ansible/ansible.cfg) = False
pipelining(/etc/ansible/ansible.cfg) = True
scp_if_ssh(/etc/ansible/ansible.cfg) = smart
ssh_args(/etc/ansible/ansible.cfg) = -C -o ControlMaster=auto -o ControlPersist=1800s
timeout(/etc/ansible/ansible.cfg) = 60

SHELL:
=====

sh:
__
remote_tmp(/etc/ansible/ansible.cfg) = ~/.ansible/tmp
```


### OS / Environment

EulerOS

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
any
```
config：
primaryIp: 'aa.aa.aa.aa'
standbyIp: 'bb.bb.bb.bb'
user_name: xx

inventory:
[xx]
primary ansible_ssh_user={{user_name}} ansible_ssh_host={{primaryIp}}
standby ansible_ssh_user={{user_name}} ansible_ssh_host={{standbyIp}}

### Expected Results

ssh normal:
![image](https://user-images.githubusercontent.com/14883035/210030411-9148fd27-d707-4291-a58b-3b3348b6b039.png)


### Actual Results

```console
version after 2.13.x:

ansible_ssh_host can not be replaced with actual IP，ssh {{primaryIp}} or {{standbyip}}, so failed with:

<{{standbyIp}}> ESTABLISH PARAMIKO SSH CONNECTION FOR USER: {{user_name}} on PORT 22 TO {{standbyIp}}
fatal: [primary]: UNREACHABLE! => {
    "changed": false,
    "msg": "[Errno -2] Name or service not known",
    "unreachable": true
}
Traceback (most recent call last):
  File "/opt/ansible/lib64/python3.9/site-packages/ansible/plugins/connection/paramiko_ssh.py", line 345, in _connect_uncached
    ssh.connect(
  File "/opt/ansible/lib64/python3.9/site-packages/paramiko/client.py", line 340, in connect
    to_try = list(self._families_and_addresses(hostname, port))
  File "/opt/ansible/lib64/python3.9/site-packages/paramiko/client.py", line 203, in _families_and_addresses
    addrinfos = socket.getaddrinfo(
  File "/usr/lib64/python3.9/socket.py", line 954, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
fatal: [standby]: UNREACHABLE! => {
    "changed": false,
    "msg": "[Errno -2] Name or service not known",
    "unreachable": true
}
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
version_added: '2.7'
          vars:
              - name: ansible_ssh_common_args
          cli:
              - name: ssh_common_args
          default: ''
          deprecated:
              why: In favor of the "proxy_command" option.
              version: "2.18"
              alternatives: proxy_command
      ssh_extra_args:
          description: Only used in parsing ProxyCommand for use in this plugin.
          vars:
              - name: ansible_ssh_extra_args
          env:
            - name: ANSIBLE_SSH_EXTRA_ARGS
              version_added: '2.7'
          ini:
            - key: ssh_extra_args
              section: ssh_connection
              version_added: '2.7'
          cli:
            - name: ssh_extra_args
          default: ''
          deprecated:
              why: In favor of the "proxy_command" option.
              version: "2.18"
              alternatives: proxy_command
      pty:
        default: True