docker_container_exec: improve handling of chdir option (#243)

* Only pass chdir on when it is provided, and prevent this option from being used for Docker SDK for Python < 3.0.0.

* Also fix docker_api connection plugin.
This commit is contained in:
Felix Fontein
2021-11-30 09:14:34 +01:00
committed by GitHub
parent abd057f447
commit bed775c4ea
3 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -164,7 +164,7 @@ class Connection(ConnectionBase):
stderr=True,
stdin=need_stdin,
user=self._play_context.remote_user or '',
workdir=None,
# workdir=None, - only works for Docker SDK for Python 3.0.0 and later
))
exec_id = exec_data['Id']