mirror of
https://github.com/ansible/ansible.git
synced 2026-05-28 04:32:20 -04:00
Fix async_dir variable expansion to match remote_tmp
This commit is contained in:
parent
ef9d92b31d
commit
392a004d55
3 changed files with 15 additions and 2 deletions
|
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- async_wrapper - fix variable expansion in async_dir to match remote_tmp behavior (https://github.com/ansible/ansible/issues/85370).
|
||||
|
|
@ -241,7 +241,7 @@ def main():
|
|||
async_dir = os.environ.get('ANSIBLE_ASYNC_DIR', '~/.ansible_async')
|
||||
|
||||
# setup job output directory
|
||||
jobdir = os.path.expanduser(async_dir)
|
||||
jobdir = os.path.expanduser(os.path.expandvars(async_dir))
|
||||
global job_path
|
||||
job_path = os.path.join(jobdir, jid)
|
||||
|
||||
|
|
|
|||
|
|
@ -279,7 +279,18 @@
|
|||
- name: remove custom tmp dir after test
|
||||
file:
|
||||
path: '{{ custom_async_tmp }}'
|
||||
state: absent
|
||||
|
||||
- name: test async with $HOME variable expansion
|
||||
command: echo "test"
|
||||
async: 5
|
||||
poll: 1
|
||||
vars:
|
||||
ansible_async_dir: "$HOME/.ansible_test_var_expansion"
|
||||
|
||||
- name: verify $HOME was expanded and cleanup
|
||||
file:
|
||||
path: "{{ ansible_env.HOME }}/.ansible_test_var_expansion"
|
||||
state: absent
|
||||
|
||||
- name: Test that async has stdin
|
||||
command: >
|
||||
|
|
|
|||
Loading…
Reference in a new issue