set cwd to task's basedir (#16805)

* switch cwd to basedir of task

This restores previous behaviour in pre 2.0 and allows for 'local type' plugins
and actions to have a more predictable relative path.

fixes #14489

* removed FIXME since prev commit 'fixes' this

* fix tests, now they need a loader (thanks jimi!)
This commit is contained in:
Brian Coca 2016-07-25 08:11:45 -04:00 committed by GitHub
parent 363596c67f
commit e2f17f8d9b
3 changed files with 11 additions and 3 deletions

View file

@ -69,7 +69,6 @@ class Connection(ConnectionBase):
executable = C.DEFAULT_EXECUTABLE.split()[0] if C.DEFAULT_EXECUTABLE else None
display.vvv(u"EXEC {0}".format(cmd), host=self._play_context.remote_addr)
# FIXME: cwd= needs to be set to the basedir of the playbook
display.debug("opening command with Popen()")
if isinstance(cmd, (text_type, binary_type)):