1
0
Fork 0
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:
objectified 2015-08-24 12:12:28 -04:00
parent 8f2a6a9fae
commit 3a5522a22c

View file

@ -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