diff options
author | Alex Willmer <alex@moreati.org.uk> | 2024-12-05 20:56:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-05 20:56:14 +0100 |
commit | e2b454f4e331b9d77d15f7e7aff655e2c7745a61 (patch) | |
tree | d2a9efb1732a8aaf7462f848752b7ebd1dc7e8c0 /lib | |
parent | document decrypt also works on strings (#84412) (diff) | |
download | ansible-e2b454f4e331b9d77d15f7e7aff655e2c7745a61.tar.xz ansible-e2b454f4e331b9d77d15f7e7aff655e2c7745a61.zip |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ansible/plugins/connection/local.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ansible/plugins/connection/local.py b/lib/ansible/plugins/connection/local.py index 2fa8f491a0..d77b37a43b 100644 --- a/lib/ansible/plugins/connection/local.py +++ b/lib/ansible/plugins/connection/local.py @@ -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 |