mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fake being connected for logging purposes
This commit is contained in:
parent
8f2a6a9fae
commit
3a5522a22c
1 changed files with 7 additions and 1 deletions
|
@ -80,6 +80,12 @@ class Connection(ConnectionBase):
|
|||
|
||||
def _connect(self, port=None):
|
||||
""" Connect to the container. Nothing to do """
|
||||
if not self._connected:
|
||||
self._display.vvv("ESTABLISH LOCAL CONNECTION FOR USER: {0}".format(
|
||||
self._play_context.remote_user, host=self._play_context.remote_addr)
|
||||
)
|
||||
self._connected = True
|
||||
|
||||
return self
|
||||
|
||||
def exec_command(self, cmd, tmp_path, sudo_user=None, sudoable=False,
|
||||
|
@ -162,4 +168,4 @@ class Connection(ConnectionBase):
|
|||
|
||||
def close(self):
|
||||
""" Terminate the connection. Nothing to do for Docker"""
|
||||
pass
|
||||
self._connected = False
|
||||
|
|
Loading…
Reference in a new issue