Debian Codegraph @

tests/ansible/lib/modules/custom_bash_old_style_module.sh

raw
1 #!/bin/bash
2 # I am an Ansible old-style module.
3
4 # This line is to encourage a UnicodeDecodeError in
5 # integration/runner/custom_script_interpreter.yml
6 # see https://github.com/dw/mitogen/issues/195
7 # £££ 
8 INPUT=$1
9
10 [ ! -r "$INPUT" ] && {
11 echo "Usage: $0 <input_file>" >&2
12 exit 1
13 }
14
15 echo "{"
16 echo " \"changed\": false,"
17 echo " \"msg\": \"Here is my input\","
18 echo " \"filename\": \"$INPUT\","
19 echo " \"run_via_env\": \"$RUN_VIA_ENV\","
20 echo " \"input\": [\"$(cat $INPUT | tr \" \' )\"]"
21 echo "}"