mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
Add support for cloud tests to ansible-test. (#24315)
* Split out ansible-test docker functions. * Add cloud support to ansible-test.
This commit is contained in:
parent
986765312f
commit
a07d42e16d
19 changed files with 1059 additions and 135 deletions
|
@ -155,15 +155,20 @@ class ManagePosixCI(object):
|
|||
"""
|
||||
self.scp(local, '%s@%s:%s' % (self.core_ci.connection.username, self.core_ci.connection.hostname, remote))
|
||||
|
||||
def ssh(self, command):
|
||||
def ssh(self, command, options=None):
|
||||
"""
|
||||
:type command: str | list[str]
|
||||
:type options: list[str] | None
|
||||
"""
|
||||
if not options:
|
||||
options = []
|
||||
|
||||
if isinstance(command, list):
|
||||
command = ' '.join(pipes.quote(c) for c in command)
|
||||
|
||||
run_command(self.core_ci.args,
|
||||
['ssh', '-tt', '-q'] + self.ssh_args +
|
||||
options +
|
||||
['-p', str(self.core_ci.connection.port),
|
||||
'%s@%s' % (self.core_ci.connection.username, self.core_ci.connection.hostname)] +
|
||||
self.become + [pipes.quote(command)])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue