diff --git a/tests/ansible/integration/context_service/remote_tmp.yml b/tests/ansible/integration/context_service/remote_tmp.yml index efa92467b..efe47e866 100644 --- a/tests/ansible/integration/context_service/remote_tmp.yml +++ b/tests/ansible/integration/context_service/remote_tmp.yml @@ -3,8 +3,6 @@ - name: integration/context_service/remote_tmp.yml hosts: test-targets gather_facts: false - vars: - ansible_remote_tmp: ~/.ansible/remote_tmp_test tasks: - name: Exercise ansible_remote_tmp copy: @@ -13,9 +11,20 @@ content: | Created by integration/context_service/remote_tmp.yml + - debug: + msg: ANSIBLE_REMOTE_TMP={{ lookup('env', 'ANSIBLE_REMOTE_TMP') }} + + - command: + ls -l "{{ lookup('env', 'ANSIBLE_REMOTE_TMP') }}" + changed_when: false + register: out + + - debug: + var: out + - name: Delete ansible_remote_tmp raw: | - rm -rf "{{ ansible_remote_tmp }}" + rm -rf "{{ lookup('env', 'ANSIBLE_REMOTE_TMP') }}" - name: Do something else that requires ansible_remote_tmp file: diff --git a/tox.ini b/tox.ini index 55fd1842e..4023fca36 100644 --- a/tox.ini +++ b/tox.ini @@ -105,6 +105,7 @@ passenv = AWS_SECRET_ACCESS_KEY HOME setenv = + ANSIBLE_REMOTE_TMP = ~/.local/remote_tmp_test # See also azure-pipelines.yml ANSIBLE_STRATEGY = mitogen_linear NOCOVERAGE_ERASE = 1