|
|
@ -184,15 +184,18 @@ class ActionModuleMixin(ansible.plugins.action.ActionBase):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
LOG.debug('_make_tmp_path(remote_user=%r)', remote_user)
|
|
|
|
LOG.debug('_make_tmp_path(remote_user=%r)', remote_user)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
|
|
|
remote_tmp = self._connection._shell.get_option('remote_tmp')
|
|
|
|
|
|
|
|
except AttributeError:
|
|
|
|
|
|
|
|
# Required for <2.4.x.
|
|
|
|
|
|
|
|
remote_tmp = '~/.ansible'
|
|
|
|
|
|
|
|
|
|
|
|
# _make_tmp_path() is basically a global stashed away as Shell.tmpdir.
|
|
|
|
# _make_tmp_path() is basically a global stashed away as Shell.tmpdir.
|
|
|
|
# The copy action plugin violates layering and grabs this attribute
|
|
|
|
# The copy action plugin violates layering and grabs this attribute
|
|
|
|
# directly.
|
|
|
|
# directly.
|
|
|
|
self._connection._shell.tmpdir = self.call(
|
|
|
|
self._connection._shell.tmpdir = self.call(
|
|
|
|
ansible_mitogen.helpers.make_temp_directory,
|
|
|
|
ansible_mitogen.helpers.make_temp_directory,
|
|
|
|
base_dir=self._remote_expand_user(
|
|
|
|
base_dir=self._remote_expand_user(remote_tmp),
|
|
|
|
# ~/.ansible
|
|
|
|
|
|
|
|
self._connection._shell.get_option('remote_tmp')
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
LOG.debug('Temporary directory: %r', self._connection._shell.tmpdir)
|
|
|
|
LOG.debug('Temporary directory: %r', self._connection._shell.tmpdir)
|
|
|
|
self._cleanup_remote_tmp = True
|
|
|
|
self._cleanup_remote_tmp = True
|
|
|
|