mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
fixed storing of cwd
This commit is contained in:
@@ -721,8 +721,8 @@ class ActionBase(with_metaclass(ABCMeta, object)):
|
|||||||
|
|
||||||
# Change directory to basedir of task for command execution when connection is local
|
# Change directory to basedir of task for command execution when connection is local
|
||||||
if self._connection.transport == 'local':
|
if self._connection.transport == 'local':
|
||||||
os.chdir(self._loader.get_basedir())
|
|
||||||
cwd = os.getcwd()
|
cwd = os.getcwd()
|
||||||
|
os.chdir(self._loader.get_basedir())
|
||||||
try:
|
try:
|
||||||
rc, stdout, stderr = self._connection.exec_command(cmd, in_data=in_data, sudoable=sudoable)
|
rc, stdout, stderr = self._connection.exec_command(cmd, in_data=in_data, sudoable=sudoable)
|
||||||
finally:
|
finally:
|
||||||
|
|||||||
Reference in New Issue
Block a user