issue #164: verify remote_tmp respected by code running remotely.
parent
e0381606af
commit
aa8d7a0250
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# I am an Ansible WANT_JSON module that returns the paths to its argv[0] and
|
||||
# args file.
|
||||
|
||||
INPUT="$1"
|
||||
|
||||
[ ! -r "$INPUT" ] && {
|
||||
echo "Usage: $0 <input_file.json>" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "{"
|
||||
echo " \"changed\": false,"
|
||||
echo " \"msg\": \"Here is my input\","
|
||||
echo " \"input\": [$(< $INPUT)],"
|
||||
echo " \"argv0\": \"$0\","
|
||||
echo " \"argv1\": \"$1\""
|
||||
echo "}"
|
@ -0,0 +1,16 @@
|
||||
#
|
||||
# The ansible.cfg remote_tmp setting should be copied to the target and used
|
||||
# when generating temporary paths created by the runner.py code executing
|
||||
# remotely.
|
||||
#
|
||||
- hosts: all
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- bash_return_paths:
|
||||
register: output
|
||||
|
||||
- assert:
|
||||
that: output.argv0.startswith('%s/.ansible/mitogen-tests/' % ansible_user_dir)
|
||||
|
||||
- assert:
|
||||
that: output.argv1.startswith('%s/.ansible/mitogen-tests/' % ansible_user_dir)
|
Loading…
Reference in New Issue