issue #164: fix remote_tmp handling on <2.5
This commit is contained in:
parent
3ebe600389
commit
26cc0f2724
|
@ -21,7 +21,7 @@ echo travis_fold:end:docker_setup
|
|||
|
||||
|
||||
echo travis_fold:start:job_setup
|
||||
pip install -U ansible==${ANSIBLE_VERSION}"
|
||||
pip install -U ansible=="${ANSIBLE_VERSION}"
|
||||
cd ${TRAVIS_BUILD_DIR}/tests/ansible
|
||||
|
||||
cat >> ${TMPDIR}/hosts <<-EOF
|
||||
|
|
|
@ -39,6 +39,7 @@ from ansible.module_utils._text import to_bytes
|
|||
from ansible.parsing.utils.jsonify import jsonify
|
||||
|
||||
import ansible
|
||||
import ansible.constants
|
||||
import ansible.plugins
|
||||
import ansible.plugins.action
|
||||
|
||||
|
@ -184,8 +185,7 @@ class ActionModuleMixin(ansible.plugins.action.ActionBase):
|
|||
try:
|
||||
s = self._connection._shell.get_option('remote_tmp')
|
||||
except AttributeError:
|
||||
# Required for <2.4.x.
|
||||
s = '~/.ansible'
|
||||
s = ansible.constants.DEFAULT_REMOTE_TMP # <=2.4.x
|
||||
|
||||
return self._remote_expand_user(s)
|
||||
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
- hosts: all
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- bash_return_paths:
|
||||
- name: integration/runner__remote_tmp.yml
|
||||
bash_return_paths:
|
||||
register: output
|
||||
|
||||
- assert:
|
||||
|
|
Loading…
Reference in New Issue