33 lines
845 B
YAML
33 lines
845 B
YAML
|
# related to issue 301. Essentially ensure remote_expand_user does not support
|
||
|
# $HOME expansion.
|
||
|
|
||
|
- name: integration/action/remote_expand_user.yml
|
||
|
hosts: test-targets
|
||
|
any_errors_fatal: true
|
||
|
gather_facts: true
|
||
|
tasks:
|
||
|
|
||
|
# Expand ~/foo
|
||
|
- action_passthrough:
|
||
|
method: _remote_expand_user
|
||
|
args: ['~/foo']
|
||
|
register: out
|
||
|
- assert:
|
||
|
that: out.result == '{{ansible_user_dir}}/foo'
|
||
|
|
||
|
# Expand ~user/foo
|
||
|
- action_passthrough:
|
||
|
method: _remote_expand_user
|
||
|
args: ['~{{ansible_user_id}}/foo']
|
||
|
register: out
|
||
|
- assert:
|
||
|
that: out.result == '{{ansible_user_dir}}/foo'
|
||
|
|
||
|
# Expanding $HOME/foo has no effect.
|
||
|
- action_passthrough:
|
||
|
method: _remote_expand_user
|
||
|
args: ['$HOME/foo']
|
||
|
register: out
|
||
|
- assert:
|
||
|
that: out.result == '$HOME/foo'
|