2018-04-01 20:20:23 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# I am an Ansible old-style module.
|
|
|
|
|
2018-04-20 19:47:07 +00:00
|
|
|
# This line is to encourage a UnicodeDecodeError in
|
|
|
|
# integration/runner/custom_script_interpreter.yml
|
|
|
|
# see https://github.com/dw/mitogen/issues/195
|
|
|
|
# £££
|
2018-04-01 20:20:23 +00:00
|
|
|
INPUT=$1
|
|
|
|
|
|
|
|
[ ! -r "$INPUT" ] && {
|
2018-04-02 07:05:37 +00:00
|
|
|
echo "Usage: $0 <input_file>" >&2
|
2018-04-01 20:20:23 +00:00
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "{"
|
|
|
|
echo " \"changed\": false,"
|
|
|
|
echo " \"msg\": \"Here is my input\","
|
2018-04-02 07:05:37 +00:00
|
|
|
echo " \"filename\": \"$INPUT\","
|
2018-04-01 20:20:23 +00:00
|
|
|
echo " \"input\": [\"$(cat $INPUT | tr \" \' )\"]"
|
|
|
|
echo "}"
|