issue #164: fix remote_tmp handling on <2.5

pull/193/head
David Wilson 7 years ago
parent 3ebe600389
commit 26cc0f2724

@ -21,7 +21,7 @@ echo travis_fold:end:docker_setup
echo travis_fold:start:job_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 cd ${TRAVIS_BUILD_DIR}/tests/ansible
cat >> ${TMPDIR}/hosts <<-EOF cat >> ${TMPDIR}/hosts <<-EOF

@ -39,6 +39,7 @@ from ansible.module_utils._text import to_bytes
from ansible.parsing.utils.jsonify import jsonify from ansible.parsing.utils.jsonify import jsonify
import ansible import ansible
import ansible.constants
import ansible.plugins import ansible.plugins
import ansible.plugins.action import ansible.plugins.action
@ -184,8 +185,7 @@ class ActionModuleMixin(ansible.plugins.action.ActionBase):
try: try:
s = self._connection._shell.get_option('remote_tmp') s = self._connection._shell.get_option('remote_tmp')
except AttributeError: except AttributeError:
# Required for <2.4.x. s = ansible.constants.DEFAULT_REMOTE_TMP # <=2.4.x
s = '~/.ansible'
return self._remote_expand_user(s) return self._remote_expand_user(s)

@ -6,7 +6,8 @@
- hosts: all - hosts: all
gather_facts: true gather_facts: true
tasks: tasks:
- bash_return_paths: - name: integration/runner__remote_tmp.yml
bash_return_paths:
register: output register: output
- assert: - assert:

Loading…
Cancel
Save