Skip to content

Commit

Permalink
fixed storing of cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoca committed Oct 4, 2016
1 parent 2330554 commit d9d7e41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible/plugins/action/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,8 +721,8 @@ def _low_level_execute_command(self, cmd, sudoable=True, in_data=None, executabl

# Change directory to basedir of task for command execution when connection is local
if self._connection.transport == 'local':
os.chdir(self._loader.get_basedir())
cwd = os.getcwd()
os.chdir(self._loader.get_basedir())
try:
rc, stdout, stderr = self._connection.exec_command(cmd, in_data=in_data, sudoable=sudoable)
finally:
Expand Down

0 comments on commit d9d7e41

Please sign in to comment.