Guest User

Untitled

a guest
Jan 17th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. diff --git a/lib/ansible/plugins/action/__init__.py b/lib/ansible/plugins/action/__init__.py
  2. index 223a588413..5bba47a958 100644
  3. --- a/lib/ansible/plugins/action/__init__.py
  4. +++ b/lib/ansible/plugins/action/__init__.py
  5. @@ -567,8 +567,6 @@ class ActionBase(with_metaclass(ABCMeta, object)):
  6. if pwd:
  7. expanded = pwd
  8. quote = None
  9. - elif len(expand_path) > 1:
  10. - expanded = self._connection._shell.join_path(initial_fragment, *expand_path[1:])
  11. else:
  12. expanded = initial_fragment
  13.  
  14. diff --git a/lib/ansible/plugins/shell/__init__.py b/lib/ansible/plugins/shell/__init__.py
  15. index 7eae68579e..60498d70a2 100644
  16. --- a/lib/ansible/plugins/shell/__init__.py
  17. +++ b/lib/ansible/plugins/shell/__init__.py
  18. @@ -155,7 +155,9 @@ class ShellBase(AnsiblePlugin):
  19. if not _USER_HOME_PATH_RE.match(user_home_path):
  20. # shlex_quote will make the shell return the string verbatim
  21. user_home_path = shlex_quote(user_home_path)
  22. - return 'echo "%s\t%spwd%s"' % (user_home_path, self._SHELL_SUB_LEFT, self._SHELL_SUB_RIGHT)
  23. + return 'echo "%secho %s%s\t%spwd%s"'\
  24. + % (self._SHELL_SUB_LEFT, user_home_path, self._SHELL_SUB_RIGHT,
  25. + self._SHELL_SUB_LEFT, self._SHELL_SUB_RIGHT)
  26.  
  27. def build_module_command(self, env_string, shebang, cmd, arg_path=None):
  28. # don't quote the cmd if it's an empty string, because this will break pipelining mode
Add Comment
Please, Sign In to add comment