Compare commits

...

4 commits

Author SHA1 Message Date
Sloane Hertel
a6f27abb61
Merge a2e79c4e68 into 12a1c25f5e 2023-07-13 14:12:57 +00:00
s-hertel
a2e79c4e68 Update the azure-pipelines-test-container to 4.0.1
Fixes testing with Python > 3.9 up the controller
2023-07-13 14:11:46 +00:00
s-hertel
2592341f3b add a changelog 2023-07-13 14:02:04 +00:00
s-hertel
4df43acac1 remove deprecated internal argument from synchronize
the new_stdin argument is no longer used to instantiate a connection plugin
2023-07-13 14:02:04 +00:00
3 changed files with 8 additions and 5 deletions

View file

@ -36,7 +36,7 @@ variables:
resources:
containers:
- container: default
image: quay.io/ansible/azure-pipelines-test-container:3.0.0
image: quay.io/ansible/azure-pipelines-test-container:4.0.1
pool: Standard

View file

@ -0,0 +1,2 @@
trivial:
- synchronize - instantiate the connection plugin without the ``new_stdin`` argument, which is deprecated in ansible-core 2.15 (https://github.com/ansible-collections/ansible.posix/pull/421).

View file

@ -284,9 +284,6 @@ class ActionModule(ActionBase):
# told (via delegate_to) that a different host is the source of the
# rsync
if not use_delegate and remote_transport:
# Create a connection to localhost to run rsync on
new_stdin = self._connection._new_stdin
# Unlike port, there can be only one shell
localhost_shell = None
for host in C.LOCALHOST:
@ -315,7 +312,11 @@ class ActionModule(ActionBase):
localhost_executable = C.DEFAULT_EXECUTABLE
self._play_context.executable = localhost_executable
new_connection = connection_loader.get('local', self._play_context, new_stdin)
try:
new_connection = connection_loader.get('local', self._play_context)
except TypeError:
# Needed for ansible-core < 2.15
new_connection = connection_loader.get('local', self._play_context, self._connection._new_stdin)
self._connection = new_connection
# Override _remote_is_local as an instance attribute specifically for the synchronize use case
# ensuring we set local tmpdir correctly