diff options
author | Brian Coca <brian.coca+git@gmail.com> | 2017-01-26 14:38:36 -0500 |
---|---|---|
committer | Brian Coca <brian.coca+git@gmail.com> | 2017-01-26 14:39:49 -0500 |
commit | 75de5737f770ae40c976a59acb11cdfc7b3643c9 (patch) | |
tree | 8690b72ea6c73b5be4a6b7124a250f30e170ecaf | |
parent | 21106cc95bfabfad51d8831ecd050475d4806103 (diff) | |
download | ansible-75de5737f770ae40c976a59acb11cdfc7b3643c9.tar.gz |
fix improper setting become user for tmpdir
fixes #20706
(cherry picked from commit 0a8b856102bfcc54b11027e1951c77bcb8ec3320)
-rw-r--r-- | lib/ansible/plugins/action/__init__.py | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/ansible/plugins/action/__init__.py b/lib/ansible/plugins/action/__init__.py index 4b4a677de1..5973c8df20 100644 --- a/lib/ansible/plugins/action/__init__.py +++ b/lib/ansible/plugins/action/__init__.py @@ -498,13 +498,8 @@ class ActionBase(with_metaclass(ABCMeta, object)): # FIXME: Can't use os.path.sep for Windows paths. split_path = path.split(os.path.sep, 1) expand_path = split_path[0] - if expand_path == '~': - if self._play_context.become and self._play_context.become_user: - expand_path = '~%s' % self._play_context.become_user - cmd = self._connection._shell.expand_user(expand_path) data = self._low_level_execute_command(cmd, sudoable=False) - #initial_fragment = utils.last_non_blank_line(data['stdout']) initial_fragment = data['stdout'].strip().splitlines()[-1] if not initial_fragment: |