issue #164: fix remote_tmp handling on <2.5

This commit is contained in:
David Wilson 2018-04-04 20:19:46 +01:00
parent 3ebe600389
commit 26cc0f2724
3 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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)

View File

@ -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: