mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Coalesce forms of ssh_args in order of most specific to least
This commit is contained in:
parent
2587edb4f3
commit
45d9cfcc6f
1 changed files with 6 additions and 2 deletions
|
@ -144,9 +144,13 @@ class Connection(ConnectionBase):
|
||||||
def _parse_proxy_command(self, port=22):
|
def _parse_proxy_command(self, port=22):
|
||||||
proxy_command = None
|
proxy_command = None
|
||||||
# Parse ansible_ssh_common_args, specifically looking for ProxyCommand
|
# Parse ansible_ssh_common_args, specifically looking for ProxyCommand
|
||||||
ssh_common_args = getattr(self._play_context, 'ssh_common_args', None)
|
ssh_args = [
|
||||||
|
getattr(self._play_context, 'ssh_extra_args', ''),
|
||||||
|
getattr(self._play_context, 'ssh_common_args', ''),
|
||||||
|
getattr(self._play_context, 'ssh_args', ''),
|
||||||
|
]
|
||||||
if ssh_common_args is not None:
|
if ssh_common_args is not None:
|
||||||
args = self._split_ssh_args(ssh_common_args)
|
args = self._split_ssh_args(' '.join(ssh_args))
|
||||||
for i, arg in enumerate(args):
|
for i, arg in enumerate(args):
|
||||||
if arg.lower() == 'proxycommand':
|
if arg.lower() == 'proxycommand':
|
||||||
# _split_ssh_args split ProxyCommand from the command itself
|
# _split_ssh_args split ProxyCommand from the command itself
|
||||||
|
|
Loading…
Reference in a new issue