wait_for_connection: fix errant warning for local connection(s) (#84421)

This prevents "[WARNING]: Reset is not implemented for this connection" when
using wait_for_connection with localhost or other local hosts.

It's arguable (from a consistency/correctness perspective) that
`ansible.plugins.connection.local.Connection.reset()` should call
`Connection.close()`. I went for a no-op on the basis of "if it aint broke
don't fix it", and erred on the side of keeping existing semantics. However
either option would be fine with me.
This commit is contained in:
Alex Willmer
2024-12-05 14:56:14 -05:00
committed by GitHub
parent 5208cffd91
commit e2b454f4e3
2 changed files with 5 additions and 0 deletions
@@ -0,0 +1,2 @@
bugfixes:
- wait_for_connection - a warning was displayed if any hosts used a local connection (https://github.com/ansible/ansible/issues/84419)
+3
View File
@@ -189,6 +189,9 @@ class Connection(ConnectionBase):
display.vvv(u"FETCH {0} TO {1}".format(in_path, out_path), host=self._play_context.remote_addr)
self.put_file(in_path, out_path)
def reset(self) -> None:
pass
def close(self) -> None:
""" terminate the connection; nothing to do here """
self._connected = False