From 0a8b856102bfcc54b11027e1951c77bcb8ec3320 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 26 Jan 2017 14:38:36 -0500 Subject: [PATCH] fix improper setting become user for tmpdir fixes #20706 --- lib/ansible/plugins/action/__init__.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/ansible/plugins/action/__init__.py b/lib/ansible/plugins/action/__init__.py index b3a0213beb..17aa2b7beb 100644 --- a/lib/ansible/plugins/action/__init__.py +++ b/lib/ansible/plugins/action/__init__.py @@ -503,13 +503,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: